Wednesday, May 15, 2019

Resetting a local branch to its HEAD version in GIT

Hi,

In this blog we are going to see how to reset a local branch to its HEAD version.

This is going to be a very short post and hope you like it

The format of the command to RESET a branch is given below
> git reset --hard <branch-name>

Assuming you have branch named "feature/registration", then the above command would be something like the one given below...
> git reset --hard feature/registration
If the execution is successful then you would see a message as mentioned below...

HEAD is now at <version> <commit-message>

No comments:

Post a Comment

How to change the root password in linux when it is forgotten/to change

This blog is all about changing the root password of the Linux system when it is forgotten or to reset the password...   Let's get it ...