A cherry-pick is basically a commit, so if you want to undo it, you just undo the commit. when I have other local changes Stash your current changes so you can reapply them after resetting the commit. $ git stash $ git reset --hard HEAD^ $ git stash pop # or `git stash apply`, if you want to keep the changeset in the stash when I have no other local changes $ git reset --hard HEAD^
If you have splitted your commit in a chain and asume something is changed on master. Here is easiest trick to rebase on master. 1. Checkout topmost change in change branch like git fetch ssh://gitrepoexample/changes/00/00000/0 && git checkout -b change-000000 FETCH_HEAD 2. Now rebase your branch on master git rebase master 3. Ammend your last change and push git commit --amend && git push origin HEAD:refs/for/master All done. Best of luck.
Comments
Post a Comment