0% found this document useful (0 votes)
16 views1 page

Git Cheat Codes

The document outlines the steps for creating a project repository using Git, including initializing the repository, adding files, committing changes, and pushing to a remote origin. It also details how to update an existing repository and pull changes from a GitHub repository to a local repository. Additionally, it mentions collaboration with team members as part of the process.

Uploaded by

Logess War
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views1 page

Git Cheat Codes

The document outlines the steps for creating a project repository using Git, including initializing the repository, adding files, committing changes, and pushing to a remote origin. It also details how to update an existing repository and pull changes from a GitHub repository to a local repository. Additionally, it mentions collaboration with team members as part of the process.

Uploaded by

Logess War
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

For Creating Project Repository

git remote -v

git init

git add .

git status

git commit -m "first commit"


[if it ask for authentication then authenticate it again RERUN this command ]

git branch -m main

git remote add origin "< Directory-Name >"

git push -u origin main


______________________________________________________

For Updates existing Repository

git add .

git status (Able to see changes)

git commit -m "second commit"


[if it ask for authentication then authenticate it again RERUN this command ]

git push -u origin main

______________________________________________________

Moving changes from gitHub repo to local repo( the changes we have done in github
from other source will reflect to our local repo

git pull origin main/master

______________________________________________________

Collaborate with team members

You might also like