我git stash在我正在处理的分支上做了一个,然后结帐到另一个分支。现在,当我签出到我以前的分支并做了一个git stash apply它表明我有冲突
Auto-merging projects/src/app/feature/some.service.ts
CONFLICT (content): Merge conflict in projects/src/app/feature/some.service.ts
Run Code Online (Sandbox Code Playgroud)
我已经解决了冲突并尝试了,git stash apply但它仍然抛出相同的错误。试图解决冲突,git add .并且git stash apply,还是同样的错误。
我看到很多线程都在谈论解决这个问题,但我担心我可能会丢失所有更改。请帮忙
一旦你解决了你的冲突并运行git add .,你就完成了。
您无需申请额外的git stash apply.
如果您想检查最顶层存储中的内容,请使用:
# will show a summary of what files were touched :
git stash show
# will show the diff of what is stashed :
git stash show -p
Run Code Online (Sandbox Code Playgroud)
如果你想列出你目前藏匿的所有东西:
git stash list
Run Code Online (Sandbox Code Playgroud)
如果你想检查一个特定的藏匿处:
git stash show [-p] stash@{xx}
# stash@{0} is the topmost stash,
# 'git stash show stash@{0}' is the same as 'git stash show'
Run Code Online (Sandbox Code Playgroud)
您还可以应用特定的 stash :
git stash apply stash@{xx}
Run Code Online (Sandbox Code Playgroud)