0

pulling from a GIT repository I am obtaining this error message:

$ git pull
remote: Counting objects: 19, done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 19 (delta 5), reused 0 (delta 0)
Unpacking objects: 100% (19/19), done.
From https://bitbucket.org/xxx/my-project
   4910263..fd2a59b  master     -> origin/master
error: Your local changes to the following files would be overwritten by merge:
        my-project/src/main/synapse-config/api/xxxTest.xml
Please commit your changes or stash them before you merge.
Aborting
Updating 4910263..fd2a59b

I think that it depends by the fact that there are some not committed minor changes on my local version. How can I say to git to ignore my local change and take all from the remote repository?

AndreaNobili
  • 40,955
  • 107
  • 324
  • 596
  • Possible duplicate of [How do I discard unstaged changes in Git?](http://stackoverflow.com/questions/52704/how-do-i-discard-unstaged-changes-in-git) – 1615903 Mar 30 '17 at 14:04

1 Answers1

2

Stash them as git is asking you to do, do the pull and then stash pop.

eftshift0
  • 26,375
  • 3
  • 36
  • 60