SlideShare a Scribd company logo
Git Cheat Sheet
Git is a distributed version-control system for tracking changes in source code during
software development.
by lam
󰅂Con gure tooling
Con gure user information
for all local repositories
Sets the name you want
attached to your commit
transactions
git config --global use
r.name "[name]"
Sets the email you want
attached to your commit
transactions
git config --global use
r.email "[email addres
s]"
Enables helpful colorization of
command line output
git config --global col
or.ui auto
󰅂Create repositories
When starting out with a new
repository, you only need to
do it once; either locally, then
push to GitHub, or by cloning
an existing repository.
Turn an existing directory into
a git repository
git init
Clone (download) a repository
that already exists on GitHub,
including all of the les,
branches, and commits
git clone [url]
󰅂The .gitgnore le
Sometimes it may be a good
idea to exclude les from
being tracked with Git. This is
typically done in a special le
named .gitignore . You can
nd helpful templates for
.gitignore les at
github.com/github/gitignore.
󰅂Branches
Branches are an important
part of working with Git. Any
commits you make will be
made on the branch you're
currently “checked out” to.
Use git status to see which
branch that is.
Creates a new branch
git branch [branch-nam
e]
Switches to the speci ed
branch and updates the
working directory
git checkout [branch-na
me]
Combines the speci ed
branch’s history into the
current branch. This is usually
done in pull requests but is an
important Git operation.
git merge [branch]
Deletes the speci ed branch
git branch -d [branch-n
󰅂
Synchronize
changes
Synchronize your local
repository with the remote
repository on GitHub.com
Downloads all history from
the remote tracking branches
git fetch
Combines remote tracking
branch into current local
branch
git merge
Uploads all local branch
commits to GitHub
git push
Updates your current local
working branch with all new
󰅂Make changes
Browse and inspect the
evolution of project les
Lists version history for the
current branch
git log
Lists version history for a le,
including renames
git log --follow [file]
Shows content di erences
between two branches
git diff [first-branc
h]...[second-branch]
󰏪
󰅢
ame]
commits from the
corresponding remote branch
on GitHub. git pull is a
combination of git fetch and
git merge 
git pull
Outputs metadata and
content changes of the
speci ed commit
git show [commit]
Snapshots the le in
preparation for versioning
git add [file]
Records le snapshots
permanently in version history
git commit -m "[descrip
tive message]"
󰅂Redo commits
Erase mistakes and craft
replacement history
Undoes all commits after
[commit], preserving changes
locally
git reset [commit]
Discards all history and
changes back to the speci ed
commit
git reset --hard [commi
t]
󰅂Glossary
an open source, distributed
version-control system 
git
a platform for hosting and
collaborating on Git
repositories 
GitHub
a Git object, a snapshot of
your entire repository
compressed into a SHA 
commit
a lightweight movable pointer
to a commit 
branch
a local version of a repository,
including all commits and
branches 
clone
a common repository on
GitHub that all team member
use to exchange their changes 
remote
a copy of a repository on
GitHub owned by a di erent
user 
fork
a place to compare and discuss
the di erences introduced on
a branch with reviews,
comments, integrated tests,
󰏪
󰅢
CheatSheetMaker.com SimpleCheatSheet.com
and more 
pull request
representing your current
working directory, the HEAD
pointer can be moved to
di erent branches, tags, or
commits when using git
checkout
HEAD
󰏪
󰅢
Ad

More Related Content

What's hot (17)

Git 入门与实践
Git 入门与实践Git 入门与实践
Git 入门与实践
Terry Wang
 
test
testtest
test
zwned
 
Tài liệu sử dụng GitHub
Tài liệu sử dụng GitHubTài liệu sử dụng GitHub
Tài liệu sử dụng GitHub
viet nghiem
 
Extra bit with git
Extra bit with gitExtra bit with git
Extra bit with git
Himanshu Agrawal
 
Hacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHubHacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHub
DSC GVP
 
Introduction To Git
Introduction To GitIntroduction To Git
Introduction To Git
Nikhil Vishnu P.V
 
Git commands
Git commandsGit commands
Git commands
Viyaan Jhiingade
 
Advanced Web Development in PHP - Code Versioning and Branching with Git
Advanced Web Development in PHP - Code Versioning and Branching with GitAdvanced Web Development in PHP - Code Versioning and Branching with Git
Advanced Web Development in PHP - Code Versioning and Branching with Git
Rasan Samarasinghe
 
Git cheat-sheet-education
Git cheat-sheet-educationGit cheat-sheet-education
Git cheat-sheet-education
Avitesh Kesharwani
 
Version Control Systems with git (and github) as an example
Version Control Systems with git (and github) as an exampleVersion Control Systems with git (and github) as an example
Version Control Systems with git (and github) as an example
Gaurav Kumar Garg
 
18 Git #burningkeyboards
18 Git #burningkeyboards18 Git #burningkeyboards
18 Git #burningkeyboards
Denis Ristic
 
Git for developers
Git for developersGit for developers
Git for developers
Hacen Dadda
 
Extra bit with git
Extra bit with gitExtra bit with git
Extra bit with git
gdgjss
 
From svn to git
From svn to gitFrom svn to git
From svn to git
Nehal Shah
 
Git undo
Git undoGit undo
Git undo
Avilay Parekh
 
Lagos GitHub Meetup - What is Git?
Lagos GitHub Meetup - What is Git?Lagos GitHub Meetup - What is Git?
Lagos GitHub Meetup - What is Git?
Celestine Omin
 
Linux GIT commands
Linux GIT commandsLinux GIT commands
Linux GIT commands
RajKumar Rampelli
 
Git 入门与实践
Git 入门与实践Git 入门与实践
Git 入门与实践
Terry Wang
 
test
testtest
test
zwned
 
Tài liệu sử dụng GitHub
Tài liệu sử dụng GitHubTài liệu sử dụng GitHub
Tài liệu sử dụng GitHub
viet nghiem
 
Hacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHubHacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHub
DSC GVP
 
Advanced Web Development in PHP - Code Versioning and Branching with Git
Advanced Web Development in PHP - Code Versioning and Branching with GitAdvanced Web Development in PHP - Code Versioning and Branching with Git
Advanced Web Development in PHP - Code Versioning and Branching with Git
Rasan Samarasinghe
 
Version Control Systems with git (and github) as an example
Version Control Systems with git (and github) as an exampleVersion Control Systems with git (and github) as an example
Version Control Systems with git (and github) as an example
Gaurav Kumar Garg
 
18 Git #burningkeyboards
18 Git #burningkeyboards18 Git #burningkeyboards
18 Git #burningkeyboards
Denis Ristic
 
Git for developers
Git for developersGit for developers
Git for developers
Hacen Dadda
 
Extra bit with git
Extra bit with gitExtra bit with git
Extra bit with git
gdgjss
 
From svn to git
From svn to gitFrom svn to git
From svn to git
Nehal Shah
 
Lagos GitHub Meetup - What is Git?
Lagos GitHub Meetup - What is Git?Lagos GitHub Meetup - What is Git?
Lagos GitHub Meetup - What is Git?
Celestine Omin
 

Similar to Git cheat sheet (20)

Collaborative development with Git | Workshop
Collaborative development with Git | WorkshopCollaborative development with Git | Workshop
Collaborative development with Git | Workshop
Anuchit Chalothorn
 
GITHappens, powerpoint about git and github
GITHappens, powerpoint about git and githubGITHappens, powerpoint about git and github
GITHappens, powerpoint about git and github
alidor4702
 
Git introduction
Git introductionGit introduction
Git introduction
satyendrajaladi
 
Git
GitGit
Git
Terry Wang
 
Git 入门 与 实践
Git 入门 与 实践Git 入门 与 实践
Git 入门 与 实践
Terry Wang
 
Git basics for beginners
Git basics for beginnersGit basics for beginners
Git basics for beginners
PravallikaTammisetty
 
GitHub and Open Source - GDGoC MIT Anna University
GitHub and Open Source - GDGoC MIT Anna UniversityGitHub and Open Source - GDGoC MIT Anna University
GitHub and Open Source - GDGoC MIT Anna University
mitgdsc
 
Git github
Git githubGit github
Git github
Anurag Deb
 
Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?
9 series
 
github_gyan.pptx
github_gyan.pptxgithub_gyan.pptx
github_gyan.pptx
AyushSingh931502
 
Github git-cheat-sheet
Github git-cheat-sheetGithub git-cheat-sheet
Github git-cheat-sheet
jaehyok Song
 
SVN 2 Git
SVN 2 GitSVN 2 Git
SVN 2 Git
Marco De Stefano
 
Version Control System-git status,git add,git commit,git log.pptx
Version Control System-git status,git add,git commit,git log.pptxVersion Control System-git status,git add,git commit,git log.pptx
Version Control System-git status,git add,git commit,git log.pptx
ChayapathiAR
 
Version Control Systems Software Engineering
Version Control Systems Software EngineeringVersion Control Systems Software Engineering
Version Control Systems Software Engineering
ssuser1c86e3
 
Techmoneyguide
TechmoneyguideTechmoneyguide
Techmoneyguide
Rockstartssl
 
Git cheat-sheet-education
Git cheat-sheet-educationGit cheat-sheet-education
Git cheat-sheet-education
ssuser0bad24
 
Github git-cheat-sheet
Github git-cheat-sheetGithub git-cheat-sheet
Github git-cheat-sheet
Jae Nwawe
 
Github git-cheat-sheet
Github git-cheat-sheetGithub git-cheat-sheet
Github git-cheat-sheet
Augusto Gabriel Luna Bardales
 
Github git-cheat-sheet
Github git-cheat-sheetGithub git-cheat-sheet
Github git-cheat-sheet
Adeel Munir
 
Github git-cheat-sheet
Github git-cheat-sheetGithub git-cheat-sheet
Github git-cheat-sheet
vartmp
 
Collaborative development with Git | Workshop
Collaborative development with Git | WorkshopCollaborative development with Git | Workshop
Collaborative development with Git | Workshop
Anuchit Chalothorn
 
GITHappens, powerpoint about git and github
GITHappens, powerpoint about git and githubGITHappens, powerpoint about git and github
GITHappens, powerpoint about git and github
alidor4702
 
Git 入门 与 实践
Git 入门 与 实践Git 入门 与 实践
Git 入门 与 实践
Terry Wang
 
GitHub and Open Source - GDGoC MIT Anna University
GitHub and Open Source - GDGoC MIT Anna UniversityGitHub and Open Source - GDGoC MIT Anna University
GitHub and Open Source - GDGoC MIT Anna University
mitgdsc
 
Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?
9 series
 
Github git-cheat-sheet
Github git-cheat-sheetGithub git-cheat-sheet
Github git-cheat-sheet
jaehyok Song
 
Version Control System-git status,git add,git commit,git log.pptx
Version Control System-git status,git add,git commit,git log.pptxVersion Control System-git status,git add,git commit,git log.pptx
Version Control System-git status,git add,git commit,git log.pptx
ChayapathiAR
 
Version Control Systems Software Engineering
Version Control Systems Software EngineeringVersion Control Systems Software Engineering
Version Control Systems Software Engineering
ssuser1c86e3
 
Git cheat-sheet-education
Git cheat-sheet-educationGit cheat-sheet-education
Git cheat-sheet-education
ssuser0bad24
 
Github git-cheat-sheet
Github git-cheat-sheetGithub git-cheat-sheet
Github git-cheat-sheet
Jae Nwawe
 
Github git-cheat-sheet
Github git-cheat-sheetGithub git-cheat-sheet
Github git-cheat-sheet
Adeel Munir
 
Github git-cheat-sheet
Github git-cheat-sheetGithub git-cheat-sheet
Github git-cheat-sheet
vartmp
 
Ad

More from Lam Hoang (14)

Py spark cheat sheet by cheatsheetmaker.com
Py spark cheat sheet by cheatsheetmaker.comPy spark cheat sheet by cheatsheetmaker.com
Py spark cheat sheet by cheatsheetmaker.com
Lam Hoang
 
VS Code cheat sheet
VS Code cheat sheetVS Code cheat sheet
VS Code cheat sheet
Lam Hoang
 
PostgreSql cheat sheet
PostgreSql cheat sheetPostgreSql cheat sheet
PostgreSql cheat sheet
Lam Hoang
 
Nginx cheat sheet
Nginx cheat sheetNginx cheat sheet
Nginx cheat sheet
Lam Hoang
 
MySql cheat sheet
MySql cheat sheetMySql cheat sheet
MySql cheat sheet
Lam Hoang
 
Html cheat sheet
Html cheat sheetHtml cheat sheet
Html cheat sheet
Lam Hoang
 
Django cheat sheet
Django cheat sheetDjango cheat sheet
Django cheat sheet
Lam Hoang
 
Css cheat sheet
Css cheat sheetCss cheat sheet
Css cheat sheet
Lam Hoang
 
Apache cheat sheet
Apache cheat sheetApache cheat sheet
Apache cheat sheet
Lam Hoang
 
Battle chatter minecraft 1.4.7 mod
Battle chatter minecraft 1.4.7 modBattle chatter minecraft 1.4.7 mod
Battle chatter minecraft 1.4.7 mod
Lam Hoang
 
On thi dai_hoc_mon_van_2010 (1)
On thi dai_hoc_mon_van_2010 (1)On thi dai_hoc_mon_van_2010 (1)
On thi dai_hoc_mon_van_2010 (1)
Lam Hoang
 
ôn thi môn văn
ôn thi môn vănôn thi môn văn
ôn thi môn văn
Lam Hoang
 
On thi dai_hoc_mon_van_2010
On thi dai_hoc_mon_van_2010On thi dai_hoc_mon_van_2010
On thi dai_hoc_mon_van_2010
Lam Hoang
 
giáo trình c căn bản
giáo trình c căn bảngiáo trình c căn bản
giáo trình c căn bản
Lam Hoang
 
Py spark cheat sheet by cheatsheetmaker.com
Py spark cheat sheet by cheatsheetmaker.comPy spark cheat sheet by cheatsheetmaker.com
Py spark cheat sheet by cheatsheetmaker.com
Lam Hoang
 
VS Code cheat sheet
VS Code cheat sheetVS Code cheat sheet
VS Code cheat sheet
Lam Hoang
 
PostgreSql cheat sheet
PostgreSql cheat sheetPostgreSql cheat sheet
PostgreSql cheat sheet
Lam Hoang
 
Nginx cheat sheet
Nginx cheat sheetNginx cheat sheet
Nginx cheat sheet
Lam Hoang
 
MySql cheat sheet
MySql cheat sheetMySql cheat sheet
MySql cheat sheet
Lam Hoang
 
Html cheat sheet
Html cheat sheetHtml cheat sheet
Html cheat sheet
Lam Hoang
 
Django cheat sheet
Django cheat sheetDjango cheat sheet
Django cheat sheet
Lam Hoang
 
Css cheat sheet
Css cheat sheetCss cheat sheet
Css cheat sheet
Lam Hoang
 
Apache cheat sheet
Apache cheat sheetApache cheat sheet
Apache cheat sheet
Lam Hoang
 
Battle chatter minecraft 1.4.7 mod
Battle chatter minecraft 1.4.7 modBattle chatter minecraft 1.4.7 mod
Battle chatter minecraft 1.4.7 mod
Lam Hoang
 
On thi dai_hoc_mon_van_2010 (1)
On thi dai_hoc_mon_van_2010 (1)On thi dai_hoc_mon_van_2010 (1)
On thi dai_hoc_mon_van_2010 (1)
Lam Hoang
 
ôn thi môn văn
ôn thi môn vănôn thi môn văn
ôn thi môn văn
Lam Hoang
 
On thi dai_hoc_mon_van_2010
On thi dai_hoc_mon_van_2010On thi dai_hoc_mon_van_2010
On thi dai_hoc_mon_van_2010
Lam Hoang
 
giáo trình c căn bản
giáo trình c căn bảngiáo trình c căn bản
giáo trình c căn bản
Lam Hoang
 
Ad

Recently uploaded (20)

Raish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdfRaish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdf
RaishKhanji
 
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design ThinkingDT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DhruvChotaliya2
 
ELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdfELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdf
Shiju Jacob
 
Oil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdfOil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdf
M7md3li2
 
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
inmishra17121973
 
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdfMAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
ssuser562df4
 
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITYADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ijscai
 
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
charlesdick1345
 
Introduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptxIntroduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptx
AS1920
 
Degree_of_Automation.pdf for Instrumentation and industrial specialist
Degree_of_Automation.pdf for  Instrumentation  and industrial specialistDegree_of_Automation.pdf for  Instrumentation  and industrial specialist
Degree_of_Automation.pdf for Instrumentation and industrial specialist
shreyabhosale19
 
new ppt artificial intelligence historyyy
new ppt artificial intelligence historyyynew ppt artificial intelligence historyyy
new ppt artificial intelligence historyyy
PianoPianist
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Journal of Soft Computing in Civil Engineering
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
Smart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineeringSmart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineering
rushikeshnavghare94
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
Data Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptxData Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptx
RushaliDeshmukh2
 
Avnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights FlyerAvnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights Flyer
WillDavies22
 
Raish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdfRaish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdf
RaishKhanji
 
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design ThinkingDT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DhruvChotaliya2
 
ELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdfELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdf
Shiju Jacob
 
Oil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdfOil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdf
M7md3li2
 
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
inmishra17121973
 
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdfMAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
ssuser562df4
 
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITYADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ijscai
 
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
charlesdick1345
 
Introduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptxIntroduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptx
AS1920
 
Degree_of_Automation.pdf for Instrumentation and industrial specialist
Degree_of_Automation.pdf for  Instrumentation  and industrial specialistDegree_of_Automation.pdf for  Instrumentation  and industrial specialist
Degree_of_Automation.pdf for Instrumentation and industrial specialist
shreyabhosale19
 
new ppt artificial intelligence historyyy
new ppt artificial intelligence historyyynew ppt artificial intelligence historyyy
new ppt artificial intelligence historyyy
PianoPianist
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
Smart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineeringSmart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineering
rushikeshnavghare94
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
Data Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptxData Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptx
RushaliDeshmukh2
 
Avnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights FlyerAvnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights Flyer
WillDavies22
 

Git cheat sheet

  • 1. Git Cheat Sheet Git is a distributed version-control system for tracking changes in source code during software development. by lam 󰅂Con gure tooling Con gure user information for all local repositories Sets the name you want attached to your commit transactions git config --global use r.name "[name]" Sets the email you want attached to your commit transactions git config --global use r.email "[email addres s]" Enables helpful colorization of command line output git config --global col or.ui auto 󰅂Create repositories When starting out with a new repository, you only need to do it once; either locally, then push to GitHub, or by cloning an existing repository. Turn an existing directory into a git repository git init Clone (download) a repository that already exists on GitHub, including all of the les, branches, and commits git clone [url] 󰅂The .gitgnore le Sometimes it may be a good idea to exclude les from being tracked with Git. This is typically done in a special le named .gitignore . You can nd helpful templates for .gitignore les at github.com/github/gitignore. 󰅂Branches Branches are an important part of working with Git. Any commits you make will be made on the branch you're currently “checked out” to. Use git status to see which branch that is. Creates a new branch git branch [branch-nam e] Switches to the speci ed branch and updates the working directory git checkout [branch-na me] Combines the speci ed branch’s history into the current branch. This is usually done in pull requests but is an important Git operation. git merge [branch] Deletes the speci ed branch git branch -d [branch-n 󰅂 Synchronize changes Synchronize your local repository with the remote repository on GitHub.com Downloads all history from the remote tracking branches git fetch Combines remote tracking branch into current local branch git merge Uploads all local branch commits to GitHub git push Updates your current local working branch with all new 󰅂Make changes Browse and inspect the evolution of project les Lists version history for the current branch git log Lists version history for a le, including renames git log --follow [file] Shows content di erences between two branches git diff [first-branc h]...[second-branch] 󰏪 󰅢
  • 2. ame] commits from the corresponding remote branch on GitHub. git pull is a combination of git fetch and git merge  git pull Outputs metadata and content changes of the speci ed commit git show [commit] Snapshots the le in preparation for versioning git add [file] Records le snapshots permanently in version history git commit -m "[descrip tive message]" 󰅂Redo commits Erase mistakes and craft replacement history Undoes all commits after [commit], preserving changes locally git reset [commit] Discards all history and changes back to the speci ed commit git reset --hard [commi t] 󰅂Glossary an open source, distributed version-control system  git a platform for hosting and collaborating on Git repositories  GitHub a Git object, a snapshot of your entire repository compressed into a SHA  commit a lightweight movable pointer to a commit  branch a local version of a repository, including all commits and branches  clone a common repository on GitHub that all team member use to exchange their changes  remote a copy of a repository on GitHub owned by a di erent user  fork a place to compare and discuss the di erences introduced on a branch with reviews, comments, integrated tests, 󰏪 󰅢
  • 3. CheatSheetMaker.com SimpleCheatSheet.com and more  pull request representing your current working directory, the HEAD pointer can be moved to di erent branches, tags, or commits when using git checkout HEAD 󰏪 󰅢