Merge or Cherry-Pick?

Dawit A adawit at kde.org
Thu Feb 3 05:21:17 GMT 2011


On Wed, Feb 2, 2011 at 1:03 PM, Dawit A <adawit at kde.org> wrote:
> Would someone be so kind to tell me how to undo accidentally pushed
> commits to trunk ? By accident I pushed the following commits to trunk
> when I only meant to push backported fixes in 4.6 branch:
>
> http://quickgit.kde.org/?p=kdelibs.git&a=commit&h=e6f00fdd71328b26e57ef09e97e4aca569c4199c
> http://quickgit.kde.org/?p=kdelibs.git&a=commit&h=65ac813c955c97798b53cd3f45854c40bdd2feaa
> http://quickgit.kde.org/?p=kdelibs.git&a=commit&h=449d49908ce610d9af4e8e3da89466f168f66bc3

For those like me who made a mistake like this one there is an easy
solution... Do

git config --global push.default tracking

and use the -t or --track option when creating your branches (branch
or checkout -b). This way you can 'git push' (no arguments) in the
current tracked branch without accidentally pushing your changes in
other branches.




More information about the kde-core-devel mailing list