On Jan 27, 2011, at 1:51 PM, Thomas Marsh wrote:
> Hello,
>
> hooray, managed to get everything to compile! Thanks for swift help. Now onto pamela. I made my changes but have managed to get myself into some git trouble. Sorry, I just don't speak git yet, no matter how many tutorials I look at.
>
> Not quite sure how to explain this one: I tried to branch then make my edits but missed out the checkout stage, git pulled probably at the wrong point tried to remove my commits and start over, but failed to do so. 'gitk' gives a slightly complex looking loop at the end, see the attached image. I hardly dare 'git push' with this non-linear appearance. How do I get out of it?
>
> sorry for wasting your time, but I am almost there I think,
>
No worries.
You did some local commits on master and then did a git pull which pulled in my patch to scb. The little loop tries to resolve the fact that there are two parents. Thanks for sending the gitk image.
Ordinarily in this situation you would have done a "git pull --rebase" which would do a pull and then reapply your patches to the tip of master.
To resolve this you can simply do
git reset --hard HEAD^
(assuming you haven't got any local changes uncommitted). This will act as if the last merge never happened.
Then
git pull --rebase
and gitk should now show you a linear history that you can push safely.
--
Tim Jenness
Joint Astronomy Centre
|