How to checkout to previous working git branch

How to checkout to previous working git branch


In this article, you will learn how to move to previous working branch in git, which means git checkout to previous branch.


1. If you want to move or checkout to exactly to the previous git branch, you can follow as:

$ git checkout -

2. Here, you can checkout to your previous git branch according to your branch list.

$ git checkout @{-1}

in above command git checkout @{-1} , you can change with another number. @{-N}, N is number where need to move to branches list point or position.


Thanks for reading.

© Copyright - 2018 - 2022 | All rights reserved at Funda of Web IT