$ git stash branch testchanges Switched to anewbranch"testchanges"# On branch testchanges # Changes to be committed:#(use"git reset HEAD <file>..."to unstage)# # modified:index.html # # Changes not stagedforcommit:#(use"git add <file>..."to update what will be committed)# # modifi...
Remove a single stashed state from the stash list and apply it on top of the current working tree state, i.e., do the inverse operation ofgit stash save. The working directory must match the index. Applying the state can fail with conflicts; in this case, it is not removed from the ...
if current=$(git rev-parse --verify --quiet $ref_stash) then git update-ref -d $ref_stash $current fi } create_stash () { stash_msg="$1" untracked="$2" git update-index -q --refresh if no_changes then exit 0 ...
Git stash temporarily shelves or stashes changes made to your working copy so you can work on something else, and come back and re-apply them later on.
$ git stash apply --index # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: index.html # # Changed but not updated: # (use "git add <file>..." to update what will be committed) ...
Show the changes recorded in the stash entry as a diff between the stashed contents and the commit back when the stash entry was first created. By default, the command shows the diffstat, but it will accept any format known togit diff(e.g.,git stash show -p stash@{1}to view the ...
1. stash当前修改 git stash会把所有未提交的修改(包括暂存的和非暂存的)都保存起来,用于后续恢复当前工作目录。 比如下面的中间状态,通过git stash命令推送一个新的储藏,当前的工作目录就干净了。 $ git statusOnbranch master Changestobe committed:newfile: style.css ...
>>> Stashed changes 其他命令 git stash save "save message": 执行存储时,添加备注,方便查找,只有git stash也要可以的,但查找时不方便识别。 git stash show:显示做了哪些改动,默认show第一个存储,如果要显示其他存贮,后面加stash@{$num},比如第二个 git stash show stash@{1} git stash...
2 changes: 1 addition & 1 deletion 2 git-stash.sh Original file line numberDiff line numberDiff line change @@ -228,7 +228,7 @@ save_stash () { test "$untracked" = "all" && CLEAN_X_OPTION=-x || CLEAN_X_OPTION= if test -n "$untracked" then git clean --force --quiet $...
no changes added to commit (use "git add" and/or "git commit -a") Du kannst sehen, dass Git die Dateien, die du beim Speichern des Stashes zurückgesetzt hast, erneut modifiziert. In diesem Fall hattest du ein sauberes Arbeitsverzeichnis, als du versucht hast, den Stash anzuwenden de...