char m
char m

Reputation: 8336

how to get new version from git/sourcetree even if I have local changes?

My local changes should not conflict in any way, but still I get:

error: Your local changes to the following files would be overwritten by merge: ExampleApp/ExampleApp.cs ExampleApp/ExampleApp.csproj SharedCode/SharedCode.csproj Please, commit your changes or stash them before you can merge.

when I try to Pull.

I just want them merged automatically, or in case of conflict do manual merge.

EDIT: my changes should not be in version control. at least not for others to see.

Upvotes: 1

Views: 2089

Answers (2)

Ya Zhuang
Ya Zhuang

Reputation: 4660

git checkout -b temp_branch git add -A git commit -m 'wip' git fetch origin git pull --rebase origin/master


  1. click "Branch" button,
  2. create a new Branch
  3. click "Commit" button,
  4. select all "Unstaged files" and write some commit msg.
  5. "commit"
  6. checkout master branch by double clicking the branch name on the sidebar
  7. pull

Upvotes: 1

ybbs
ybbs

Reputation: 49

Why don't you go to your repository location, browse through the commits, and see which are the files giving you a conflict? Then you can take a backup of the files giving you conflicts, and then merge your changes, maybe using WinMerge.

Upvotes: 0

Related Questions