how to reset local repository branch to be just like remote repository head

Reset Local Repository:

To reset the local master branch to the remote repository using the following command:

git reset --hard origin/master

What is origin in git

origin is an alias created by Git and specifies the remote URL of the remote repository. Usually, Git automatically assumes the remote repository’s name is origin.

If you have a different remote name, replace origin with the name you are using.


Tags:

git

Share:

Related posts