Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
WSMathias authored Aug 11, 2022
1 parent ad66db3 commit df2409d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,12 @@


### Git diff
Note: ref1 and ref2 could be branch names, remotename/branchname, commit SHAs, etc
| Command | Description |
|---------|-------------|
| ` git diff <branch_name> -- <local_path> ` | Show difference between working dir file/ and a local/remote branch |
| ` git diff ref1:path/to/file1 ref2:path/to/file2 ` | Show difference between two references |
| ` git diff -- path/to/file ... origin ` | Show file difference between local file and remote file of the current branch |
| ` git diff branch_name:path/to/file ` | Simplified version of the above command |

### Git patch
without author info:
Expand Down Expand Up @@ -193,6 +196,7 @@ unset LESS
---
- [http://schacon.github.io/git/git.html](http://schacon.github.io/git/git.html)
- [zsh git aliases](https://github.com/ohmyzsh/ohmyzsh/wiki/Cheatsheet#git)
- [What is HEAD ?](https://stackoverflow.com/a/54935492/7247089)

[git-template-stackoverflow]: https://stackoverflow.com/questions/2293498/applying-a-git-post-commit-hook-to-all-current-and-future-repos
[git-config-stackoverflow]: https://stackoverflow.com/questions/11868447/how-can-i-remove-an-entry-in-global-configuration-with-git-config
Expand Down

0 comments on commit df2409d

Please sign in to comment.