Skip to content

Commit 9a29bdf

Browse files
authored
Update mark-git.md
1 parent 0bcca09 commit 9a29bdf

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

mark-git.md

+9
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,12 @@ git push origin --delete <branchName>
8282
14.提取某个commit 提交合并到当前commit (当前commit 标识不变)
8383
单个commit git cherry-pick `commitId`
8484
多个commit 只需要git cherry-pick `commitId1..commitIdn` 注意2个commitId之间的`两点`
85+
86+
15.撤销最后一次commit,并保留修改
87+
git reset HEAD~ --soft
88+
git stash
89+
然后切换到别的分支保存即可
90+
$ git checkout 分支名
91+
$ git stash pop
92+
$ git add .
93+
$ git commit -m "your message here"

0 commit comments

Comments
 (0)