- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我做了 git stash
。然后我执行了 git stash pop
但出现了以下错误:
error: Your local changes to the following files would be overwritten by merge: [proj].xcodeproj/project.xcworkspace/xcuserdata/[user].xcuserdatad/UserInterfaceState.xcuserstate Leaflet-[proj]/Leaflet.xcodeproj/xcuserdata/[user].xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist Please commit your changes or stash them before you merge. Aborting
我提交了更改。我再次尝试 git stash pop
无济于事。然后我使用 git rm --cached
删除了文件并提交了这些删除。 git stash pop
现在给出 error: refusing to lose untracked file
。
git 状态:
Your branch is ahead of 'origin/temp' by 2 commits. (use "git push" to publish your local commits)
Unmerged paths: (use "git reset HEAD ..." to unstage) (use "git add/rm ..." as appropriate to mark resolution)
deleted by us:
[proj].xcodeproj/project.xcworkspace/xcuserdata/[user].xcuserdatad/UserInterfaceState.xcuserstate deleted by us:
[proj]/xcuserdata/[user].xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
最佳答案
如果您删除了存储中的文件,则无法 merge 存储的更改,因为它无法 merge 到不存在的文件。听起来当你说你早些时候提交了你的更改时你可能已经做了 git add
但不是 git commit
?在做了 git commit
之后运行 git stash pop
应该工作。如果您确实这样做了但没有这样做,我不确定问题出在哪里,因为您当时没有提供足够的信息。
您现在有几个选择。最安全的可能是做一个 git stash branch <branchname>
.这会将你最后的存储 checkout 到一个新的分支上。从那里您可以根据需要对其进行编辑,将您的更改提交到分支,然后将其 merge 回您正在处理的分支。
如果你只是想丢弃你最近的藏品,你可以git stash drop
.
如果你想丢弃所有的存储:git stash clear
.
关于git - 删除在 git stash 中跟踪的文件,然后 git stash pop,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49930954/
我如何在一个语句中删除最旧的存储(比如最旧的 5 个存储)而不是像这样做: git stash drop stash@{3} git stash drop stash@{4} git stash dr
我认为它们应该基本相同,但是当我尝试 $ git stash show -p stash@{N} 和 $ git show stash@{N} 后者显示了一些额外的提交信息,但实际差异要短得多。 (前
我一直在 git 的一个分支上工作,然后我藏了一些东西。在分支之间进行一些切换后,我回到了我的初始分支,进行了一些新的更改,将它们存储起来,然后意识到我想回到我第一次存储之前所做的更改。 所以我的问题
我使用 git 管理主目录中的配置文件。这是我的主目录中 .gitignore 文件的简化内容。 * !.bashrc !.bash_aliases !.gitignore 我在我的主目录 .bash
这个问题在这里已经有了答案: How to remove range of git stash? (6 个答案) 关闭 4 年前。 我有以下存储列表(git stash list): stash@{
我正在尝试使用以下方式应用特定的存储: git stash apply stash@{2} 但最终出现这个错误: fatal: ambiguous argument 'stash@': unknown
我想创建一个 git 包,它只包含我的存储中不在存储所基于的点的提交。我想这样做而不是发送每一次提交,因为我知道收件人已经有每一次提交,包括分歧点。 我得到这个: $ git bundle creat
我对我的分支进行了一些更改,然后意识到我忘记了我已经对所述分支进行了一些其他必要的更改。我想要的是一种将我 stash 的更改与当前更改 merge 的方法。 有办法吗? 更多的是为了方便,我最终放弃
不太确定发生了什么,但 git stash 似乎在一个糟糕的地方。 % git stash list stash@{0}: filter-branch: rewrite stash@{1}: filt
在 channel 入口条件中使用 stash:variables 时,我遇到了 Stash 问题。 模板.html {stash:embed name="pages" stash:paginate=
很多时候,在进行实验性更改之前,我需要拍摄当前工作目录的快照作为备份。这就是我所做的。 git stash git stash apply 但是我使用了一些监听磁盘更改的应用程序,它们会导致不需要的行
在我们的办公室中,我们使用没有服务器访问权限的 Stash(最大访问级别是创建分支),因此我们需要限制特定 Git 分支的推送。所以很简单,我们需要做的就是在发布后卡住我们的分支。 目前我们正在做的是
我更改了一些文件和一些新文件 git pull: 说我在几个文件中有冲突 我做到了: git stash git pull git stash pop 我预计会发生冲突,但没有发生。 相反,许多文件现
我有一个 Windows 命令脚本,旨在将 dev 分支 merge 到项目分支中。它首先读取当前分支名称、存储更改、获取并 merge 开发和项目分支,然后切换回原始分支并 pop 存储。 问题是
git stash 的联机帮助页说 pop [--index] [-q|--quiet] [] Remove a single stashed state from the stash list an
请理解场景: 1. 一天前创建了一个新分支,并将我的工作推送到那里。 2.整天忙于sublime,修改现有文件,创建一些新文件。 3. 没有添加或提交,但存储,切换到另一个分支,在那里提交并 pop
谁能解释一下它们之间的区别: git stash 对比: git stash save ? 谢谢! 最佳答案 来自docs : Calling git stash without any argume
首先我输入 git stash show。 然后输入s和tab,显示git stash show stash@{,到此为止一切正常。 但是我输入1和tab后,变成了git stash show sta
在使用 git add -p 对索引添加一些更改后,我发布了一个 git stash 但忘记添加 --keep-index。然后我就傻傻的做了一个git stash pop,我对索引的修改都没有了。有
使用 Xcode,在尝试将代码更新推送到 Github 时,系统提示我“Pull and Stash”。我不小心选择了好吧,现在我的Xcode项目是旧版本(最后一个推送到GitHub)。我怎样才能将其
我是一名优秀的程序员,十分优秀!