I want to pull in all the latest changes from a github repo. There is only one branch and only one person (the developer) adds and modifies the code. I simply pull everything in, once a new feature is added.
Normally, all I do is:
git pull
But this time I got an error message which reads:
Automatic merge failed; fix conflicts and then commit the results.
I'd simply like to pull in the latest changes from the repo. I'm not sure why there are conflicts when only one person is responsible for this repo.
Note: I don't want to commit anything to the repo.
git rebase repo. right click file with conflicts without left-click / opening file in editor pane. click "Accept all Incoming" / "Accept all Current"
Basically, if you just watch the repo and do not change the files (or do not want your changes to remain after update) do:
git reset --hard HEAD
followed by git pull
.
This must overwrite the code on your local machine with code from github repo.
Another option would be
git fetch --all
followed by git reset --hard origin/master
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With