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

Aleix Pol aleixpol at kde.org
Tue Apr 17 21:00:44 UTC 2012


On Tue, Apr 17, 2012 at 6:17 PM, Milian Wolff <mail at milianw.de> wrote:
> 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
> --
> KDevelop-devel mailing list
> KDevelop-devel at kdevelop.org
> https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
>

:) thanks again povaddict!
and don't worry milian, these things happen! :$

Aleix




More information about the KDevelop-devel mailing list