Git Revert: When your already committed BooBoo Code to repo and need to get HEAD back to HAPPY

silosix@M6500:~/git/cmsauto$ git revert 7b55a41
On branch feature/pom_to_pombase
Your branch is up to date with 'origin/feature/pom_to_pombase'.

nothing to commit, working tree clean
silosix@M6500:~/git/cmsauto$ get reset --hard 7b55a41 && git clean -f

Command 'get' not found, but there are 18 similar ones.

silosix@M6500:~/git/cmsauto$ git reset --hard 7b55a41 && git clean -f
HEAD is now at 7b55a41 file cleanup
silosix@M6500:~/git/cmsauto$ git revert 7b55a41
[feature/pom_to_pombase 088dbb9] Revert "file cleanup"
 1 file changed, 4 insertions(+), 5 deletions(-)
silosix@M6500:~/git/cmsauto$ git push -f
Password for 'https://unityconstruct@bitbucket.org':
Counting objects: 10, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (10/10), 746 bytes | 746.00 KiB/s, done.
Total 10 (delta 4), reused 0 (delta 0)
remote:
remote: Create pull request for feature/pom_to_pombase:
remote:   https://bitbucket.org/unityconstruct/cmsauto/pull-requests/new?source=feature/pom_to_pombase&t=1
remote:
To https://bitbucket.org/unityconstruct/cmsauto.git
 + 489a687...088dbb9 feature/pom_to_pombase -> feature/pom_to_pombase (forced update)
silosix@M6500:~/git/cmsauto$ git pull

 

Tags