git pull remote branch force code example
Example 1: git force pull
git fetch --all
git reset --hard origin/master
Example 2: git pull hard
git reset --hard origin/master
Example 3: pull down remote branch git
git fetch origin
git checkout --track origin/<branch_name>
Example 4: force git pull overwrite
# if working with newer repos where 'master' is now 'main'
git fetch --all
git reset --hard origin/main