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 

Collaboration is the way different people can work on the same project together. It is like creating a group in GitHub just like Groups in other social media. The people added to the collaborator’s list can be able to push, merge, and do other kinds of similar things on the project. 
 

Similar Reads

Steps for Collaboration in GIT

Step 1: Create a Repository...

Creating Signed and Unsigned Tags

First, the question arises why do we sign a code? Well, the reason is that it shows the authority of the code, that who has written it, and who needs to be blamed if any bug arises. To create a simple tag just write:...

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....

Searching Code

GitHub provides users the feature to search code with a repository or organization. Well there are some restrictions also imposed by GitHub while searching the code. These restrictions are imposed due to the complexity of searching code. Below are the valid searches you can perform on GitHub....

Check Previous Logs

To look back into what are all the commits that are made in the repository you can simply use:...

Collaboration in GitHub

GitHub is used by developers to collaborate and share the changes made by them remotely. Where other developers can pull the changes that are made by others and can stay up-to-date and can manage workflow efficiently. The following are the aspects we should consider while collaborating on GitHub....