$ git push -f
exists. $ git pull -f
does not exist.
Instead, you can do the following:
$ git fetch
$ git reset --hard origin/branch_name
Alias registration
It may be convenient to keep it.
(Because you can easily rewrite the state of the hand, please note)
Pattern to register with $ git force-pull
~/.gitconfig
[alias] current-branch-name = ! git branch | grep -e '^\\* ' | sed -e 's/^\\* //g' force-pull = !git fetch && git reset --hard origin/$(git current-branch)
Original by
Git で force pull する方法 ( $ git reset --hard origin/branch_name )
About
チャットメンバー募集
何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。