我试图从我的工作目录中删除该文件,但使用以下命令后
git checkout file_Name.txt
Run Code Online (Sandbox Code Playgroud)
我收到以下错误消息
error: path 'first_Name.txt' is unmerged
Run Code Online (Sandbox Code Playgroud)
那是什么以及如何解决它?
以下是我的git状态
$ git status
On branch master
You are currently reverting commit f200bf5.
(fix conflicts and run "git revert --continue")
(use "git revert --abort" to cancel the revert operation)
Unmerged paths:
(use "git reset HEAD <file>..." to unstage)
(use "git add <file>..." to mark resolution)
both modified: first_file.txt
Untracked files:
(use "git add <file>..." to include in what will be committed)
explore_california/
no changes added to commit (use "git add" and/or "git commit -a")
Run Code Online (Sandbox Code Playgroud)
cri*_*oms 88
如果要放弃对文件所做的修改,可以执行以下操作:
git reset first_Name.txt
git checkout first_Name.txt
Run Code Online (Sandbox Code Playgroud)
bro*_*oot 19
要从git中删除跟踪文件(first_file.txt):
git rm first_file.txt
Run Code Online (Sandbox Code Playgroud)
要删除未跟踪的文件,请使用:
rm -r explore_california
Run Code Online (Sandbox Code Playgroud)
gcb*_*gcb 16
状态告诉你该怎么做.
Unmerged paths:
(use "git reset HEAD <file>..." to unstage)
(use "git add <file>..." to mark resolution)
Run Code Online (Sandbox Code Playgroud)
你可能应用了藏匿或其他导致冲突的东西.
添加,重置或rm.
以下对我有用
git reset HEAD
Run Code Online (Sandbox Code Playgroud)
我遇到以下错误
git stash
src/config.php: needs merge
src/config.php: needs merge
src/config.php: unmerge(230a02b5bf1c6eab8adce2cec8d573822d21241d)
src/config.php: unmerged (f5cc88c0fda69bf72107bcc5c2860c3e5eb978fa)
Run Code Online (Sandbox Code Playgroud)
然后我跑了
git reset HEAD
Run Code Online (Sandbox Code Playgroud)
有效
| 归档时间: |
|
| 查看次数: |
81728 次 |
| 最近记录: |