Subject: Re: GIT for idiot apprentice

Re: GIT for idiot apprentice

From: Alexander Lamaison <swish_at_lammy.co.uk>
Date: Wed, 2 Sep 2009 18:55:06 +0100

2009/9/2 Guenter <lists_at_gknw.net>:
> fine, so I tried:
> - git pull --rebase
> nw/Makefile.netware: needs update
> win32/Makefile.win32: needs update
> refusing to pull with rebase: your working tree is not up-to-date
>
> argh!! GIT is really a non-intuitive system for me; all I want to do is
> simply merging stuff from main repos, and commit my changes - why is
> that such hell?

I'm not sure about the other parts but I had this problem myself
yesterday. The reason is, we are trying to use GIT like SVN where you
pull remote changes into your dirty working copy and they just get
merged (with the occasional manual conflict resolution). GIT doesn't
work this way. It will only pull remote changes into a clean working
copy.

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.

HTH

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