github - How to force a pull to a file in git? -


i having merge conflict, , can rename file , pull repo ti resolve or manually edit edit. time, committed changes file has conflicts, , in staging area. tried using git reset head <file>and using git pull again, still merge conflicts. there way force overwrite of troublesome file?

here message get: error: local changes following files overwritten merge: db/profile_edit.php

i change name of file profile_edit.phpbkup. git pull , still same error. why this? file doesn't exist anymore, how can replaced?

thanks.

if want throw away changes made concurrently upstream:

git fetch origin git push -f . origin/brancha:brancha 

if want resolve conflicts favouring upstream instead:

git fetch origin git merge -s recursive -xtheirs origin/brancha 

hope helps.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -