This is a draft cheat sheet. It is a work in progress and is not finished yet.
showing logs
show last two commits |
git log --oneline -n 2 <path> |
show commit author and date in one line |
git log --pretty=format:"%h%x09%an%x09%ad%x09%s" <path> |
show modified files |
git show --pretty="" --name-only [COMMIT] |
diffs
differences between two commits using graphic diff tool |
git difftool {start_commit}..{end_commit} <path> |
managing conflicts
show only conflicted files |
git diff --name-only --diff-filter=U |
accept ours |
git checkout --ours -- [paths] |
accept theirs |
git checkout --theirs -- <paths> |
|
|
|