Git Note
Quick start
Add to last commit
- @2021-08-24
- with
git commit amend
Change committed files
from [https://www.atlassian.com/git/tutorials/rewriting-history]
| git commit --amend --no-edit
|
Edit commit note
| git commit --amend -m "New message"
|
The New message can be multiple lines. Use Ctrl+Enter to enter multiple line mode and just write another " to leave this mode. Using a pair of \backtick and \singlequote will interfere the leaving mode detection.
Download origin/master
| git pull
git checkout master
|
Git ignore
Unignore subdirectory
| dir/ # same as `dir`, same effect as `dir/*` in most cases.
dir/*/** # this wont ignore dir/file
|
Git release notes
Funny commit message collection
first commit
- @ 2021-11-26
- Let there be light.
- Big bang
Git Graph
- @2021-12-17
git log --all --decorate --oneline --graph
Revert merge
- @2021-12-17
git revert --no-commit -m 1 cd1550e
-m = `--mainline \```
- git-revert
Prune local branches
Restore deleted branches
Move commit between branch