Subject: Re: GIT for idiot apprentice

Re: GIT for idiot apprentice

From: Guenter <lists_at_gknw.net>
Date: Thu, 03 Sep 2009 22:32:31 +0200

Hi Alex,
Alexander Lamaison schrieb:
> The solution is to use 'git stash' to put your local, uncommitted
> changes on hold for the time being, then run 'git pull' (which should
> automerge nicely), then run 'git stash apply' which will merge your
> own changes back into the latest code and possibly require you to
> resolve conflict manually. Why does GIT insist on doing it this way?
> Not a clue. I've given up trying to understand GIT and now I just do
> what I'm told.
although 'git stash' worked fine for me, today I got another prob, and
to my surprise it solved automagically self(!):
- changed files yesterday
- there were other updates in the repo
- did today first a 'commit -a'
- tried 'git push' which of course failed ...
- tried 'git pull --rebase' and magically GIT merged!
- finally a 'git push' commited the changes! Woah!

git pull --rebase
Enter passphrase for key .....:
remote: Counting objects: 9, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 6 (delta 3), reused 0 (delta 0)
Unpacking objects: 100% (6/6), done.
From ssh://user@git.stuge.se/var/lib/git/libssh2
   8dabb1c..3f5a666 master -> origin/master
First, rewinding head to replay your work on top of it...
Applying: changed NetWare and MingW32 makefile to use Makefile.inc.

so seems the stash trick is not needed at all if you first commit before
you pull!

Günter.

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2009-09-03