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

12 Git Cheat Sheet

The document describes the centralized Git workflow where each coder has their own copy of the project. It illustrates how Alice and Bob can clone a remote repository, make changes locally, and push those changes back to the remote repository's master branch. The key steps are for coders to clone the remote repository, make changes locally like adding or removing files, commit those changes with messages, and push the updated master branch back to the remote repository for others to pull down.

Uploaded by

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

12 Git Cheat Sheet

The document describes the centralized Git workflow where each coder has their own copy of the project. It illustrates how Alice and Bob can clone a remote repository, make changes locally, and push those changes back to the remote repository's master branch. The key steps are for coders to clone the remote repository, make changes locally like adding or removing files, commit those changes with messages, and push the updated master branch back to the remote repository for others to pull down.

Uploaded by

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

The Simple Git Cheat Sheet – A Helpful Illustrated Guide

The Centralized Git Workflow

• Every coder has own copy of project


• Independence of workflow Git Master Branch
• No advanced branching and merging needed

Remote Repository:
Master Branch

Alice Bob
git init

Clone Create new repository


git clone alice@host:/path/repos

Clone repository
Clone
git add main.py </> git clone bob@host:/path/repos
Add file „main.py“ to project

git commit –m “new file” „new file“

Commit change and add message


„new file“ to the master branch

git push origin master

Send master branch to remote


repository Push
</>

„new file“

Pull
git pull </>

Update local repository


with master branch „new file“

git add * </> </>


Add all changes to master

git rm main.py </>


Remove file „main.py“ from
master branch

git commit –m “add 2, rem 1” „add 2,


rem 1“
Commit change and add
message to the master

git push origin master


</> </> Send master branch to
Push remote repository

„A Puzzle A Day </>


to Learn, Code,
and Play!“ „add 2, rem 1“

You might also like