# REVERT REPO TO REVISION # DOT AT THE END IS CRITICAL git checkout 7976d8559e2e9ab3a24751839996a677ab9d1469 . # MERGE COMMITS git log # count commits, for example 8 git rebase --interactive HEAD~8 # in new window replace pick to squash except the first one git push --force # PUSH TO REPO git add . && git commit -m "test" && git push # CREATE AND SWITCH TO NEW BRANCH git checkout -b mynewbranch # EQUAL COMMANDS: git branch mynewbranch git checkout mynewbranch # REVERT FILE TO DATE git show HEAD@{2017-01-10}:./simple.yml