后来发现git stash后面还能继续接参数,这里得感谢git plugin for oh-my-zsh。当临时保存一些修改的时候可以这样:git stash save "fix:xxxxx",有多个stash的时候也可以用git stash show来看到每个stash的备注,就方便多了。
1 2 3 4 5
git on new_branch [$?] via simple took 2s ➜ git stash show stash@\{0\} stash@{0}: On new_branch: feature:xxxxx (38 seconds ago) stash@{3}: On new_branch: create new file named hello.py (4 days ago) stash@{1}: On new_branch: fix:xxxxx (53 seconds ago) stash@{4}: WIP on master: 75e1918 add a (7 weeks ago) stash@{2}: On new_branch: create file zzz (4 days ago)
git on new_branch [$] via simple ➜ git stash pop stash@\{0\} On branch new_branch Changes to be committed: (use "git reset HEAD <file>..." to unstage)
git on new_branch [$] via simple ➜ git stash apply stash@\{1\} On branch new_branch Changes to be committed: (use "git reset HEAD <file>..." to unstage)