Trying to get GIT

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AnonymousHero
    Veteran
    • Jun 2007
    • 1393

    #16
    Originally posted by d_m
    Ah right. In that case you'd want to replace the rebase with "git merge official/master"
    Isn't it "git pull" rather than "git merge"? According to the docs, pull = fetch + merge which is usually what you want with a remote repo.

    Comment

    • d_m
      Angband Devteam member
      • Aug 2008
      • 1517

      #17
      Originally posted by AnonymousHero
      Isn't it "git pull" rather than "git merge"? According to the docs, pull = fetch + merge which is usually what you want with a remote repo.
      Yes. I had fetch as a separate step. You can certainly combine git fetch + git merge into git pull.I like using fetch separately so I can say "fetch --all".
      linux->xterm->screen->pmacs

      Comment

      • d_m
        Angband Devteam member
        • Aug 2008
        • 1517

        #18
        Originally posted by APWhite
        Do I have to create a new VS2008 project and use the files contained in the new clone directory or is there a way to tell Git that I am using a separate directory and Git should be looking in there instead?

        It almost looks like it would be easier to create a new VS2008 project pointing to the source in the new Git clone directory.
        I don't think there's a way to wire up your existing files to git without doing a clone, so I think you're right that it would be easier to create a new VS project using the source created from git clone.

        Please let me know if you run into other problems.
        linux->xterm->screen->pmacs

        Comment

        • APWhite
          Adept
          • Jul 2007
          • 244

          #19
          So far it is working (mostly) . I used the Add command to add the borg files. There were no reported errors. But when I send them up river, only two files made (borg2 and borg6). I will attempt to add them again and re-push.


          EDIT:
          Looks like I needed to use:
          $ git add .

          Then use the git commit and git push

          EDIT:
          Ah Crap. Looks like there is a difference between Borg and borg. Two directories were created. Can I get some help combining them and I did not use CAPS, so any idea why it would have made a Borg?
          Last edited by APWhite; April 19, 2011, 03:15.
          St George Chiropractor
          Angband Borg Homepage

          Comment

          • takkaria
            Veteran
            • Apr 2007
            • 1951

            #20
            'git mv' does a rename, like so:
            Code:
            $ git mv Borg borg
            Also, in the borg directory, a lot of the borg files have all-uppercase filenames. To fix that, you just need to

            Code:
            $ cd borg
            $ git mv BORG1.C borg1.c
            $ git mv BORG1.H borg1.h
            etc.

            And then to commit those changes, again just use

            Code:
            git commit
            takkaria whispers something about options. -more-

            Comment

            • Derakon
              Prophet
              • Dec 2009
              • 9022

              #21
              Code:
              git mv bork bork bork!
              Sorry, I couldn't resist!

              Comment

              • APWhite
                Adept
                • Jul 2007
                • 244

                #22
                Originally posted by takkaria
                'git mv' does a rename, like so:
                Code:
                $ git mv Borg borg
                Also, in the borg directory, a lot of the borg files have all-uppercase filenames. To fix that, you just need to

                Code:
                $ cd borg
                $ git mv BORG1.C borg1.c
                $ git mv BORG1.H borg1.h
                etc.

                And then to commit those changes, again just use

                Code:
                git commit

                I am not able to rename the BORG to borg. I am getting a error like this:
                Code:
                fatal: bad source, source=BORG.H, destination=borg1.h
                is there a way to check the directory listing after a use the
                Code:
                cd Borg
                ?
                I am wondering if there is a difference between Borg and borg directories.

                I appreciate the help.
                St George Chiropractor
                Angband Borg Homepage

                Comment

                • d_m
                  Angband Devteam member
                  • Aug 2008
                  • 1517

                  #23
                  Originally posted by APWhite
                  I am not able to rename the BORG to borg. I am getting a error like this:
                  Code:
                  fatal: bad source, source=BORG.H, destination=borg1.h
                  is there a way to check the directory listing after a use the
                  Code:
                  cd Borg
                  ?
                  I am wondering if there is a difference between Borg and borg directories.

                  I appreciate the help.
                  So, here are some commands that may help you:

                  ls - list the files in the current directory
                  pwd - print the current directory
                  cd - change the current directory

                  File names are case sensitive, so Borg and borg (and BORG) are all definitely different.

                  Hope this help! If you feel like using IRC you can connect to the Freenode network (irc.freenode.org) and join #angband-dev... there are often devs hanging around that can give you real-time help.
                  linux->xterm->screen->pmacs

                  Comment

                  • APWhite
                    Adept
                    • Jul 2007
                    • 244

                    #24
                    Originally posted by d_m
                    So, here are some commands that may help you:

                    ls - list the files in the current directory
                    pwd - print the current directory
                    cd - change the current directory

                    File names are case sensitive, so Borg and borg (and BORG) are all definitely different.

                    Hope this help! If you feel like using IRC you can connect to the Freenode network (irc.freenode.org) and join #angband-dev... there are often devs hanging around that can give you real-time help.

                    BINGO..

                    LS was the ticket. Thanks
                    St George Chiropractor
                    Angband Borg Homepage

                    Comment

                    • nppangband
                      NPPAngband Maintainer
                      • Dec 2008
                      • 926

                      #25
                      Does github handle merging from different branches?

                      For example: I just uploaded some changes to the NPP "work in progress" branch yesterday. Meanwhile, Antoine has some changes he would like to push to "work in progress" as well, to make incorporating NPP changes into Quickband easier. Some of the changes are to the same files I changed yesterday. Will github overwrite my changes with his if I update (meaning I should manually include his changes and commit them), or can it actually merge his changes into my changes? I thought I saw some part of the documentation that indicated it could do this, but I didn't entirely understand it.
                      NPPAngband current home page: http://nppangband.bitshepherd.net/
                      Source code repository:
                      https://github.com/nppangband/NPPAngband_QT
                      Downloads:
                      https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57

                      Comment

                      • d_m
                        Angband Devteam member
                        • Aug 2008
                        • 1517

                        #26
                        Originally posted by nppangband
                        Does github handle merging from different branches?
                        Github won't do this, but it also won't clobber old work.

                        Basically, if you want to push to a branch, your local branch has to be up-to-date with the remote branch. If there are conflicts it will make you sort them out before you push back to the remote repo (github).

                        Often a good way to handle this stuff is to do development in a purely local branch (e.g. work) and then when you want to push it back, update your master branch (getting any work other people have done from github) and then merging your work branch into your master branch (e.g. git checkout master; git merge work). If things go fine, then great. Otherwise, you still have your work branch (so you won't lose any work if the merge goes poorly).

                        The V developers haven't had many problems of accidentally clobbering someone's work (I can't think of any, although it may have happened when we first switched to git).

                        Hope this helps! Good luck!

                        EDIT: If you're having problems with this and want real-time help, feel free to jump on IRC (irc.freenode.org) and visit #angband-dev
                        linux->xterm->screen->pmacs

                        Comment

                        • Magnate
                          Angband Devteam member
                          • May 2007
                          • 5110

                          #27
                          Originally posted by nppangband
                          Does github handle merging from different branches?

                          For example: I just uploaded some changes to the NPP "work in progress" branch yesterday. Meanwhile, Antoine has some changes he would like to push to "work in progress" as well, to make incorporating NPP changes into Quickband easier. Some of the changes are to the same files I changed yesterday. Will github overwrite my changes with his if I update (meaning I should manually include his changes and commit them), or can it actually merge his changes into my changes? I thought I saw some part of the documentation that indicated it could do this, but I didn't entirely understand it.
                          The short answer is no, github won't do this for you. The first push to your wip branch on github will go smoothly. The second person will have to "git fetch" the first's chances, and then either use "git rebase" to rebase their changes on top of the first person's, or "git merge" to merge the two sets of changes together. Both will need to be done locally and any conflicts resolved before the result can be pushed back to github.
                          "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                          Comment

                          Working...
                          😀
                          😂
                          🥰
                          😘
                          🤢
                          😎
                          😞
                          😡
                          👍
                          👎