The checkout command is used to switch to a specific branch, also the checkout command gets the latest
changes from the specified branch and updates them to the local working folder.
Before using the checkout command to switch to a branch, the specific branch should
be created using the git branch
command.
The checkout command can be used with
the –b switch to create a new branch and switch to that branch in a single
command.
$git checkout -b
The above command is equivalent to the
following 2 commands.
$git branch
$git checkout
$git checkout
Use the following steps to checkout to a specific branch.
1.
Open Git Bash
2.
Navigate to the working folder in which the
changes to be committed are to be done using the cd command.
cd c:\\GitWorkingFolder\\documents
Use the “git checkout
No comments:
Post a Comment