This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir git-stash | |
cd git-stash | |
git init | |
echo 'Initial commit' > a.txt | |
git add . | |
git commit -m 'Initial commit' | |
echo 'v2' > a.txt | |
git add . | |
echo 'v3' > a.txt | |
git stash -u |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global alias.st status | |
git config --global alias.sts 'status -s' | |
git config --global alias.addall add . | |
git config --global alias.readd restore --staged | |
git config --global alias.cm commit | |
git config --global alias.lol 'log --oneline' | |
git config --global alias.type 'cat-file -t' | |
git config --global alias.dump 'cat-file -p' | |
git config --global alias.b branch | |
git config --global alias.ba 'branch -a' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log --pretty=format:'%Cred%h%Creset %ad |%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset [%Cgreen%an%Creset]' --abbrev-commit --date=short | |
[Commit Formatting](https://git-scm.com/docs/git-log#_commit_formatting) | |
``` | |
--graph | |
text-based graphical representation | |
--abbrev-commit | |
只顯示部分訊息 | |
--date=short |
OlderNewer