Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Some git Snippets
- ### Compares differences of commits with two branches
- ```
- git log master..mybranch
- ```
- ### Compares differences of commits with two branches and shows files changed
- ```
- git log --stat master..mybranch
- ```
- ### Unstages a file that is ready to commit
- ```
- git reset HEAD -- file_to_commit.txt
- ```
- ### Uncommit the last commit
- ```
- git reset --soft HEAD^
- ```
- ### Discarts file changes
- ```
- git checkout -- myfile_changed.txt
- ```
- ### Appends changed files to last commit
- ```
- git commit --amend
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement