git misery

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Pete Mack
    Prophet
    • Apr 2007
    • 6883

    git misery

    I just tried to pull the latest changes in angbandbase, and got conflict errors for every single file. It looks like a UNIX/WINDOWS EOL problem.
    Any suggestions on how to fix it, with either the UI or the command line?
  • Nick
    Vanilla maintainer
    • Apr 2007
    • 9634

    #2
    Use linux
    One for the Dark Lord on his dark throne
    In the Land of Mordor where the Shadows lie.

    Comment

    • Nick
      Vanilla maintainer
      • Apr 2007
      • 9634

      #3
      Seriously, no, I'm afraid - I haven't got a good Windows git client yet, but I haven't really been trying.
      One for the Dark Lord on his dark throne
      In the Land of Mordor where the Shadows lie.

      Comment

      • d_m
        Angband Devteam member
        • Aug 2008
        • 1517

        #4
        Originally posted by Pete Mack
        I just tried to pull the latest changes in angbandbase, and got conflict errors for every single file. It looks like a UNIX/WINDOWS EOL problem.
        Any suggestions on how to fix it, with either the UI or the command line?
        Pete, what editor on Windows are you using?

        One thing to try is to use an editor which can save unix line endings, try saving the affected files with different line endings and see how that works.

        Can you tell if the problem is that you have locally changed the endings on a bunch of lines, or if the remote source (i.e. Nick) has changed the endings on a bunch of lines?
        linux->xterm->screen->pmacs

        Comment

        • zaimoni
          Knight
          • Apr 2007
          • 590

          #5
          If you have vim installed (like I do), use it to smash the line endings into the non-conflicted form.
          Zaiband: end the "I shouldn't have survived that" experience. V3.0.6 fork on Hg.
          Zaiband 3.0.10 ETA Mar. 7 2011 (Yes, schedule slipped. Latest testing indicates not enough assert() calls to allow release.)
          Z.C++: pre-alpha C/C++ compiler system (usable preprocessor). Also on Hg. Z.C++ 0.0.10 ETA December 31 2011

          Comment

          • Derakon
            Prophet
            • Dec 2009
            • 9022

            #6
            I believe the desired vim command is

            :%s/^v^m//

            Where ^v should be interpreted as "control + v" and ^m as "control + m".

            At least, that's what I've used in the past when poking at the NPPAngband source, and I'm pretty certain that the NPP devs are using Windows.

            Comment

            • Pete Mack
              Prophet
              • Apr 2007
              • 6883

              #7
              I understand all that, and I am using vim for that reason, but it's complaining about files I never even edited!
              Grrr....
              I never had problems like this with svn or even cvs

              Comment

              • d_m
                Angband Devteam member
                • Aug 2008
                • 1517

                #8
                Originally posted by Pete Mack
                I understand all that, and I am using vim for that reason, but it's complaining about files I never even edited!
                Grrr....
                I never had problems like this with svn or even cvs
                Maybe this will help?

                Access your support options and sign in to your account for GitHub software support and product assistance. Get the help you need from our dedicated support team.
                linux->xterm->screen->pmacs

                Comment

                • Pete Mack
                  Prophet
                  • Apr 2007
                  • 6883

                  #9
                  @d_m
                  That's better, but I am still getting errors.

                  What's the correct command for syncing with source?
                  Once I figure this stuff out, I'm going to blow away my entire tree, then start over.

                  Comment

                  • Nick
                    Vanilla maintainer
                    • Apr 2007
                    • 9634

                    #10
                    If you're going to blow it all away anyway, I'd recommend making your own fork of angband/angband on github, then cloning that locally. takkaria has just updated the instructions for usehere - written in small words for people like me
                    One for the Dark Lord on his dark throne
                    In the Land of Mordor where the Shadows lie.

                    Comment

                    • Pete Mack
                      Prophet
                      • Apr 2007
                      • 6883

                      #11
                      @Nick --
                      That's crazy. I just want to keep a local copy up to date.
                      What I am really looking for is the functionality to update the local copy, and overwrite any conflicting local changes.
                      Code:
                      svn update
                      svn revert <things that update complains about>
                      svn update

                      Comment

                      • Magnate
                        Angband Devteam member
                        • May 2007
                        • 5110

                        #12
                        Originally posted by Pete Mack
                        @Nick --
                        That's crazy. I just want to keep a local copy up to date.
                        What I am really looking for is the functionality to update the local copy, and overwrite any conflicting local changes.
                        If you aren't going to maintain your own repo as Nick suggests, you can just "git clone git://github.com/angband/angband.git" to create a new local copy of the official upstream repo. Your "master" branch will automatically track origin/master.

                        To keep up to date, the commands are:

                        1. Git fetch origin

                        2. Git checkout master (if you're not there already)

                        3. Git merge origin/master

                        You shouldn't have to worry about overwriting conflicts, because you shouldn't be doing local changes in your master branch anyway. Just create a new branch for local changes and use merge or rebase to update it.

                        Similarly, you can create a staging branch to track the upstream staging branch if you want to help test that.

                        See also http://trac.rephial.org/wiki/GitUsage.
                        "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                        Comment

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