Reputation: 855
I run this command:
git pull https://bitbucket.org/NAME
Then it pops up an error:
From https://bitbucket.org/NAME/project-tool
* branch HEAD -> FETCH_HEAD
Auto-merging includes/top.php
CONFLICT (add/add): Merge conflict in includes/top.php
then it has:
(Branch|MERGING)
Which I can override with this, but I just want to pull this repository and don't care if it overrides every file (which I have backed up).
git reset --merge
How do you use git to pull in files and auto merge and override your current files?
Upvotes: 1
Views: 79
Reputation: 2624
this gets the file from the remote and stores it on the local repository
git fetch https://bitbucket.org/NAME
use the following command if you want to set your local branch to match the remote thus removing local branch changes. Make sure local files are backed up.
git reset --hard FETCH_HEAD
Upvotes: 1