0

I want to get the latest update of the project in GitHub and this message shown in android studio

Git Pull Failed Your local changes would be overwritten by merge. Commit, stash or revert them to proceed

What I did is git -> pull

And actually I do want my files to be overwritten cause we both modified the same file but mine is not correct so I would like to pull my colleague changes. I don't want to commit and push mine since they are wrong.

Any help? I don't use command

Thanks

rav
  • 211
  • 5
  • 14
  • 2
    First, You need to commit you local changes and after try pull – Dinesh May 04 '20 at 07:37
  • if you want to override your local changes see this: https://stackoverflow.com/questions/1125968/how-do-i-force-git-pull-to-overwrite-local-files git reset --hard will delete your local changes git pull will download the new ones – JArgente May 04 '20 at 07:38
  • @Dinesh Thank you so much! I'm a beginner with git it's working! – rav May 04 '20 at 07:44
  • Does this answer your question? [Cannot solve conflicts after git pull](https://stackoverflow.com/questions/28538346/cannot-solve-conflicts-after-git-pull) – phd May 04 '20 at 13:27
  • https://stackoverflow.com/search?q=%5Bgit%5D+Your+local+changes+would+be+overwritten+by+merge.+Commit%2C+stash+or+revert+them+to+proceed – phd May 04 '20 at 13:28

1 Answers1

2

First, You need to commit your local changes and after try pull

Dinesh
  • 1,410
  • 2
  • 16
  • 29