0

How do I force to pull from a branch that has amended changes?

I get the error

Automatic merge failed; fix conflicts and then commit the result.

I don't need the local branch, so I used to solve this by searching for the last clean commit, and then reset with

git reset --hard 27f35e56b4bb3467705e5afa7f7f24e5b3997140
git pull

Is there a way to just force taking the remote branch, dropping the local branch with one command?

rubo77
  • 19,527
  • 31
  • 134
  • 226

1 Answers1

0

You can use

git reset --hard  origin/<branch_name>

source: https://stackoverflow.com/a/36337438/1069083

rubo77
  • 19,527
  • 31
  • 134
  • 226