diff options
author | johannst <johannes.stoelp@gmail.com> | 2020-03-19 20:07:07 +0100 |
---|---|---|
committer | johannst <johannes.stoelp@gmail.com> | 2020-03-19 20:07:07 +0100 |
commit | 70883a31c72d9427055b41ca50ba986cd808cde4 (patch) | |
tree | 2e378ef7cd5c33cbc62a23c8d5a3d0506f91868c /src/git.md | |
parent | ed2be86b970350be0b6aa8f18b63a313f3c76983 (diff) | |
download | notes-70883a31c72d9427055b41ca50ba986cd808cde4.tar.gz notes-70883a31c72d9427055b41ca50ba986cd808cde4.zip |
updated git
Diffstat (limited to 'src/git.md')
-rw-r--r-- | src/git.md | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -60,7 +60,12 @@ '--pretty=oneline --abbrev-commit' git log --graph ...... text based graph of commit history git log --decorate ... decorate log with REFs - git log -p <file> .... show commit history + diffs for <file> +``` + +## File history +```markdown + git log -p <file> ......... show commit history + diffs for <file> + git log --oneline <file> .. show commit history for <file> in compact format ``` ## Patching @@ -74,7 +79,7 @@ number instead '1' since spcifier: -3 .................. e.g: create a patch from last three commits - <comit hash> ........ create patch with commits starting after <comit hash> + <commit hash> ....... create patch with commits starting after <commit hash> git am <patch> ......... apply patch and create a commit for it @@ -103,6 +108,8 @@ <submod>, this will pull origin/HEAD or a branch specified for the submodule + git diff --submodule ...................... show commits that are part of the + submodule diff ``` ## Inspection |