问题
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:
- git checkout --theirs
- 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