How to reset one branch onto another

In this article let’s discuss about How to reset one branch onto another. Let’s go through the following methods without any delay.

Method 1:

# Make sure your working tree is in a clean state
git status

# Check out the branch you want to change, e.g. some-branch
git checkout some-branch

# Reset that branch to some other branch/commit, e.g. target-branch
git reset --hard target-branch

Hope the above solution works.

Realted Posts : Curl ifconfig.me