My solution is stored on GitHub and I'm using the built-in features of Visual Studio to check code in and out. Currently, I'm the only one working on my project. But I've started switching between different computers.
Every time I get to where both computers have pending changes, I am unable to continue.
I'm trying to push my changes on one computer and it gives me an error:
Unable to push the remote repository because your local branch is behind the remote branch. Update your branch by pulling before pushing.
[Pull then Push] [Pull] [Cancel]
If I select [Pull then Push]
, I get a different error.
The pull operation failed. See the Output window for details.
And the Output window shows the following.
Pushing master
Hint: You have divergent branches and need to specify how to reconcile them.
Hint: You can do so by running one of the following commands sometime before
Hint: your next pull:
Hint:
Hint: git config pull.rebase false # merge
Hint: git config pull.rebase true # rebase
Hint: git config pull.ff only # fast-forward only
Hint:
Hint: You can replace "git config" with "git config --global" to set a default
Hint: preference for all repositories. You can also pass --rebase, --no-rebase,
Hint: or --ff-only on the command line to override the configured default per
Hint: invocation.
Git failed with a fatal error.
Git failed with a fatal error.
Need to specify how to reconcile divergent branches.
Both systems show the current branch is master. I was expecting the changes to be merged so I'm not sure why this is a problem.
Is there any way to get Visual Studio to merge the changes and allow me to deal with any conflicts?
Note: I'm trying to read up on this but I am not using a command line for this. I would far prefer to just use the IDE. And it seems like it should support what I'm trying to do. What I've read seems to indicate I need to set the Rebase local branch when pulling setting, but I'm not sure what I should set it to or why.