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

Installing Python and Creating Virtual Environment for Pip for package installations in Ubuntu

Hi, In this post we are going to look at how to install Python and PIP and installing packages in virtual environments.. Without wasting...