Linux technical support - [email protected]


git

# 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

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>