[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: getting along with git



On Wed, 2009-04-29 at 23:18 +0000, Kai-Martin Knaak wrote:
> Just did one of my irregular updates of my local versions of geda and pcb 
> from git. For some reason "git pull" chokes on some misconfiguration. I 
> ended up recloning (again) and did a successful make. 
> 
> git pull complains similarly with geda and with pcb. So I guess, I do 
> something stupid in my git work flow. This is, what I do to clone and 
> make:
> 
> /------
> git clone git://repo.or.cz/geda-pcb/pcjc2.git
> cd pcjc2
> git checkout -b before_pours origin/before_pours
> autogen.sh
> configure --disable-doc --enable-gl
> make
> sudo make install
> \------
> 
> If I do "git pull" a few weeks later, I get errors like this:

....
 
> Any hints?

Because I'm using stgit to manage patches, and am not keeping a clean
and unchanging history on a given branch, git pull will most likely not
work.

If I make a change somewhere in the branch you already have, (I think)
it will look to git like the rest of my branch is new commits, and the
stuff you have checked out are changes you made locally. The pull will
try to merge them - which will result in conflicts.

The easiest way to proceed (I think), is to delete the local branch and
re-check it out. (This doesn't require the cloning of the whole
repository again).

git fetch                    <- this updates your repository from mine
git checkout master          <- move off the branch we want to delete
git branch -D before_pours   <- delete it
git checkout -b before_pours origin/before_pours   <- recheck it out.


I haven't tried it, but a simpler method which (might) work is:

git fetch
git reset --hard origin/before_pours

Both of these assume that you haven't got any local changes on the
branch you checked out. If that were the case, let me know and I'll
figure out how best to get them re-based.

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user