Resolving Git conflicts in Visual Studio to have a commit after a bug at linking source and the server

我是研究僧i 提交于 2021-02-11 18:23:21

问题


Suddenly my local git repository bugged in a way that it didn't response to git commands, So with the help of a great professional here was able to reset, re-link it to the remote address at DevOps server.

Link to the previous topic: Previous topic

Now having some conflicts when trying to Cherry Commit my local repository changes to its DevOps location.

Used this:

git cherry-pick theversion

now it seems pending.

Please have a look at the below image:

Don't know what should I do now. I want all the current changes and files apply as it is in the local working project. Blame? Stage? Resolve? Should I select each individually? If those 14 in the below section are the conflicts, why I cannot point that I want to prioritize everything I have here to the remote version?

Considering this:

Resolve merge conflicts

I know that I didn't do a merge, but why here there is no "Take Source button" like what it said? It can be a similar situation.


回答1:


It seems like the commit you are cherry-picking and your local commits have a conflict (you both changed the same files, and git is asking how to handle the conflicts).
If you want to take the changes from the cherry-pick commit, while discarding your changes, run these commands in the command line for all the files:

  1. git checkout --theirs
  2. git add < filename >

After running this for all files, run:
git cherry-pick --continue

Source: checkout cherry pick



来源:https://stackoverflow.com/questions/60281158/resolving-git-conflicts-in-visual-studio-to-have-a-commit-after-a-bug-at-linking

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!