0% found this document useful (0 votes)
2 views

Git Commands

GitHub is a platform for code hosting that facilitates version control and collaboration on projects. Key Git commands include cloning repositories, creating and checking out branches, checking status, adding changes, committing locally, pushing to the main branch, and pulling updates. These commands enable effective management of code changes and collaboration among developers.

Uploaded by

akashsable0571
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Git Commands

GitHub is a platform for code hosting that facilitates version control and collaboration on projects. Key Git commands include cloning repositories, creating and checking out branches, checking status, adding changes, committing locally, pushing to the main branch, and pulling updates. These commands enable effective management of code changes and collaboration among developers.

Uploaded by

akashsable0571
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Git Hub

What is GitHub and why it is used?


GitHub is a code hosting platform for version control and collaboration. It lets you and others work together on projects
from anywhere.

Git Commands:-

• git clone :- Used to clone a repository from github to local.( will be used one time to clone the code)
• git branch “branchname” :- used to create a new working branch from main branch.
• git checkout branchname :- to checkout the working branch to be worked on.
• git status :- to check the status of the branch will show all the changes done by us.
• git add . :- to add all the changes to the working branch.
• git commit –m” message to commit” :- It is use to commit the changes to the working branch locally.
• git push origin branchname :- to push the working branch to the main branch in git hub.
• git pull origin branchname:- to pull the updated code from git repository.

You might also like