git: how to force pull a branch if there are conflicts (becase someone force pushed)
Solution 1:
- Cleanup your current prod branch by either stashing, recommended (
git stash
) or if you don't care about the changes (git reset --hard
) -
git branch -m prod_backup
# to rename your current prod banch to prod_backup (just in case) git fetch
-
git checkout prod
you should now have the changes which your colleagues pushed