Git Checkout
The git checkout command lets you navigate between the branches created by the git branch. It lets you check files in the working directory to match the version stored in that branch.
$ git checkout branch_name
This command can be easily confused with git clone but both are different. The difference between the two commands is that clone works to fetch code from a remote repository, alternatively, checkout works to switch between versions of code already on the local system.
Other Related Terminologies
push : This command is used to push the files from your local machine to the GitHub repository.
$ git push -f origin master
fetch : It is useful when you are interacting with the remote repository. Basically, this command is used to retrieve the work done by other people and update your local project accordingly.
$ git fetch remotename
pull request: It is a method of submitting your contributions to the project. It occurs when a developer asks for changes committed to an external repository to be considered for inclusion in a project’s main repository after the peer review.
$ git pull remote_name
Fetch the specified remote’s copy of the current branch and immediately merge it into the local copy. This command is the same as git fetch followed by git merge
Deleting any tag: For deleting any tag navigate to your local GitHub repository and type the following command :
$ git tag -d tagName $ git push origin :tagName
What is Collaboration in Git?
Pre-requisite: Git & GitHub