Here we will see basic commands and git terminologies overview that you need to start using git. The terms are same irrespective of which Git platforms github.com or Azure Repos , or Gitlab , bitbucket.org and various others you refer to .
Read about Git Terminologies – Branch to get better understanding of checkout command.
Checkout is performed whenever one wants to move the git reference from branch A to branch B. When we checkout ,the local folder files will be refreshed/replaced with the branch B changes.
As you see here , i have the same branching structure created previosuly. Now in this case developer has cloned Feature 1 and is currently working on related changes,
Lets say, you ask developer to start working on feature 2 , then the developer would ‘Checkout’ feature 2 branch and go ahead.
Note that, at the time of checkout, any pending change would either need to be reverted or stored for later use , we will learn about this later in the course.
Remember, while working on feature 1, the developer can checkout local branch APIChanges or UIChanges to work on corresponding changes.
Let’s look at the git command in detail. Read the article <> to install the command line tool required to try this command.
git checkout <BranchName>
Above command will clone the ‘default’ branch from the repository.
branchName – Name of the branch to checkout
|–detach (-d)||checkout a particular commit instead of checking out the branch|
|–merge (-m)||merges the local changes if any|
Share your email id here, to get access to a sample repository to try out above command.