Back

Explore Courses Blog Tutorials Interview Questions
+1 vote
2 views
in DevOps and Agile by (29.3k points)

How can I tell git to ignore my local file and take the one from my remote branch without trying to merge and causing conflicts?

1 Answer

+1 vote
by (50.2k points)

For this question try:

git stash

git checkout origin/master

If you need to include the remote changes in the master branch you can do:

git reset --hard origin/master

This will make your branch "master" to point to "origin/master".

Browse Categories

...