我使用过git pull并且发生了合并冲突:
unmerged: _widget.html.erb
You are in the middle of a conflicted merge.
Run Code Online (Sandbox Code Playgroud)
我知道该文件的其他版本是好的,我的是坏的所以我的所有更改都应该放弃.我怎样才能做到这一点?
git version-control git-merge merge-conflict-resolution git-merge-conflict
我做了一个名为'f'的分支并做了一个结账工作.当我尝试git pull命令时收到此消息:
You have not concluded your merge (MERGE_HEAD exists).
Please, commit your changes before you can merge.
Run Code Online (Sandbox Code Playgroud)
当我尝试时git status,它给了我以下内容:
On branch master
# Your branch and 'origin/master' have diverged,
# and have 1 and 13 different commit(s) each, respectively.
#
# Changes to be committed:
#
# modified: app/assets/images/backward.png
# modified: app/assets/images/forward.png
# new file: app/assets/images/index_background.jpg
# new file: app/assets/images/loading.gif
# modified: app/assets/images/pause.png
# modified: app/assets/images/play.png
# new file: app/assets/javascripts/jquery-ui-bootstrap.js
# new file: app/assets/stylesheets/jquery-ui-bootstrap.css
# …Run Code Online (Sandbox Code Playgroud) 我试图合并两个分支,这就是我所做的和发生的事情:
Abdulla (Master) new-git-project1
$ git merge sidebar
Auto-merging index.html
CONFLICT (content): Merge conflict in index.html
Automatic merge failed; fix conflicts and then commit the result.
Abdulla (Master *+|MERGING) new-git-project1
$ git merge sidebar
error: Merging is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.
Run Code Online (Sandbox Code Playgroud)
我是新手,所以我能得到简单的答案。
我一直在使用git flow,现在是时候完成第一个版本v1.0.0了.我在Windows上使用SourceTree.
当我想完成发布时,我收到了这个错误:
sh.exe C:\Users\xy\AppData\Local\Atlassian\SourceTree\gitflow_local\gitflow\git-flow release finish -f C:\Users\xy\AppData\Local\Temp\2ffrpxef.20z v1.0.0
Switched to branch 'master'
error: unable to create file component/admin/config.xml (Permission denied)
There were merge conflicts.
Completed with errors, see above.
Run Code Online (Sandbox Code Playgroud)
我不知道为什么会出现这个错误,因为不应该有任何文件权限问题,因为在使用功能分支之前从未发生过这种问题.
在上述失败之后,基本上我的所有变化都来自于我工作副本中与master相关的变化.我简单地删除了所有这些更改并删除了新文件,依此类推.不存在冲突.所以我再次准备完成我的发布.
目前开发和发布处于同一阶段,当然还有很多提交在master之前:
如何在不遇到此问题的情况下完成发布?
有没有办法强制当前的开发/发布阶段掌握?基本上所有的开发提交都应该应用到主分支 - 所以当它们出现时我想用开发分支版本解决所有合并冲突.那可能吗?