Kasrak
Kasrak

Reputation: 1561

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

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:

The screenshot

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.

Upvotes: 0

Views: 3048

Answers (1)

Eyal D
Eyal D

Reputation: 181

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

Upvotes: 1

Related Questions