Cherry-picking with git and fixing a repo for proper use

so today I was found on a mess:

git remote -v
origin (fetch)
origin (push)
upstream (fetch)
upstream (push)

git fetch upstream

git checkout -b changePasswordCommand

This command resets state to follow the original github repository and made it in sync
git reset --hard upstream/master

To reflect that on my github repository:
git push --force origin master

Now it is time to get the sha1’s from git log -g > luis.txt

git cherry-pick 0835c58f285fcbe72f974a7f2873d57bc7233e8c
git cherry-pick a8b3b14a31f69d1deca564a4e0c0c2ccc205ace4
git cherry-pick 10c9072af14be27cacd7f05b15f4d7ea0af9a27e
git cherry-pick d173f924c591c979e5a270275a26e04ecc28b150
git cherry-pick 01ea775458d365bcf0079fa35592e7aea175317f
git cherry-pick ac8f3a8160ead930d3bc53baa35b44f9274516d6

Then moved too fast and did:
git push origin changePasswordCommand

But I forgot to squash the commits so then to squash the 6 last commits I did:
git rebase -i HEAD~6

and finally had to do again:
git push --force origin changePasswordCommand

Leave a Reply

Your email address will not be published. Required fields are marked *