git-tips / tips

Most commonly used git tips and tricks.
http://git.io/git-tips
MIT License
21.4k stars 1.71k forks source link

Sync with remote, overwrite local changes #161

Open dobromir-d opened 6 years ago

dobromir-d commented 6 years ago

Hi there,

The following could be misleading to a novice in GIT: git fetch origin && git reset --hard origin/master && git clean -f -d

Perhaps this one would suffice: git fetch origin && git reset --hard HEAD && git clean -f -d

hemanth commented 6 years ago

We can put that in alternatives, thanks.