(RESOLVED) Re: HELP: 4.3 branch in KDevelop messed up

Milian Wolff mail at milianw.de
Tue Apr 17 16:17:06 UTC 2012


On Tuesday 17 April 2012 11:57:46 Andreas Pakulat wrote:
> On 17.04.12 11:26:51, Milian Wolff wrote:
> > Hey all,
> > 
> > I just noticed that apparently I severly messed up the 4.3 branch in the
> > KDevelop repo, such that it is now equal to the master branch...
> > 
> > I don't really get how I managed to do this... can someone help me?
> > 
> > http://quickgit.kde.org/index.php?p=kdevelop.git&a=shortlog&h=refs/heads/4
> > .3
> > http://quickgit.kde.org/index.php?p=kdevelop.git&a=shortlog&h=refs/heads/
> > master
> > 
> > ^- those are equal...
> > 
> > The only thing I just did was something like:
> > 
> > $ write change in master branch
> > $ git stash
> > $ git checkout 4.3
> > $ git stash pop
> > $ git commit
> > $ do a small fixup change
> > $ git commit
> > $ git rebase -i origin 4.3
> > $ git push
> > 
> > (the commit I thus pushed is this one:
> > http://quickgit.kde.org/index.php?p=kdevelop.git&a=commit&h=5799abe3b73b5e
> > e1cfda275e463529d47f35e77f)
> > 
> > Help!
> 
> As Alexandre already said, to fix this up you'll need to git push -f,
> which requires sysadmins to enable this for you IIRC.
> 
> The easiest way to get the 4.3 branch where you wanted it is to use git
> reflog to find the original commit hash it was on, then git reset --hard
> <commit-hash> while you have 4.3 checked out. Then re-apply the pushed
> commit using git cherry-pick and then merge 4.3 into master again.
> 
> This most probably happened because you did git rebase -i origin 4.3,
> never saw that syntax but I can see how this might have used origin's
> HEAD (which points to master) to rebase 4.3 onto it (i.e. your local
> commits in 4.3). git rebase -i origin/4.3 4.3 is probably what you
> wanted, but I usually just do a git rebase -i HEAD~<n> where n is the
> number of commits I want to interactively rebase for squashing/fixup
> etc.

Thanks to the help of PovAddict, this issue has been resolved.

If you use the 4.3 branch and updated since yesterday, best do this:

git branch -d 4.3
git fetch
git checkout 4.3

Bye and sorry for the inconvenience

-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20120417/156671e8/attachment.sig>


More information about the KDevelop-devel mailing list