Explore Courses Blog Tutorials Interview Questions
0 votes
in DevOps and Agile by (19.4k points)

I have a colleague who claims that git pull is harmful, and gets upset whenever someone uses it.

The git pull command seems to be the canonical way to update your local repository. Does using git pull create problems? What problems does it create? Is there a better way to update a git repository?

1 Answer

0 votes
by (27.5k points)

If you are using Git 2.0 and newer you can configure git pull to only do fast-forward merges by default:

$ git config --global pull.ff only 

This command causes git pull to act like git pull --ff-only, but it still doesn't fetch all upstream commits or clean out old origin/* branches so I still prefer git up

Browse Categories