How to reset GIT to origin/master?
Sometimes - for instance in folder containing installed composer package - the repository might remain in confusing state. Like with detached head. It doesn't sound too nice!
git reset --hard might not help. First we
need fetch origin, which is slightly different from
pull, as it will not try to merge. To reset repository to our
remote master we need to reset it hard specifying
reset point to origin/master.
After this operation all uncommited changes will be lost
Reset to origin/master
git fetch origin git reset --hard origin/master
When in detached head state, also issue commands:
git checkout master git pull
To bring Your head back to the master. These words sounds a bit sinisterly.