mddanishyusuf / dailyhack

🐱‍💻 Tiny Tiny Hacks we use in our daily life.
https://dailyhack.now.sh/
149 stars 15 forks source link

Reset local repository branch to be just like remote repository HEAD #85

Open absyah opened 5 years ago

absyah commented 5 years ago

Setting your branch to exactly match the remote branch can be done in two steps:

git fetch origin
git reset --hard origin/<branch>