On Monday 08 June 2009 17:14:57 Martin Vidner wrote:
> Hi hackers,
>
> you may be annoyed by the swamp of "Merge branch 'master' of
> [email protected]:projects.." cluttering the changelog in
> http://git.opensuse.org/?p=projects/yast/web-client.git;a=summary
>
> The solution is simple.
> Instead of this:
> 1) hack hack hack
> 2) git commit
> 3) git push
> 4) oh no, fast forward failed.
> 5) git pull
> 6) git push
>
> Do this:
> 1) hack hack hack
> 2) git pull
> 3) git commit
> 4) git push

Another option is to do

        hack hack hack
        git commit
        hack hack hack
        git commit
        ...
        git pull --rebase
        git push

This will save your commits, pull the latest version from the server, and then 
reapply your commits on top. Esp. usefull if you just want to get the latest 
version from the server without pushing your changes afterwards.
          
        before:
        
          L - M - N(master)
         /
      - A - B - C(origin/master)

        
        git pull --rebase:

                 L' - M' - N'(master)
                /
      - A - B - C(origin/master)



If you like this, you can even set it as default behavior for 'pull' in your 
~/.gitconfig:
        
    [branch]
        autosetuprebase = always


-- 

cu,
    Michael Andres

+------------------------------------------------------------------+
Key fingerprint = 2DFA 5D73 18B1 E7EF A862  27AC 3FB8 9E3A 27C6 B0E4
+------------------------------------------------------------------+
Michael Andres             YaST Development            [email protected]
SUSE LINUX Products GmbH, GF:  Markus Rex,  HRB 16746 (AG Nuernberg)
Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0
+------------------------------------------------------------------+

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to