SlideShare ist ein Scribd-Unternehmen logo
1 von 17
Downloaden Sie, um offline zu lesen
Git Study Notes
@angusli
What’s Git?
• Git is distributed version control system
focused on speed, effectivity and real-world
usability on large projects. Its highlights
include:
– Distributed development
– Strong support for non-linear development
– Efficient handling of large projects
– Cryptographic authentication of history
– Toolkit design
Who is using Git?
• Git
• Linux Kernel
• Perl
• Gnome
• Qt
• Ruby on Rails
• Android
• PostgreSQL
• Wine
• Fedora
• Debian
• X.org
• …. and you?
Study Notes
• Step 0: Environment setting and help
• Step 1: Init project
• Step 2: Change and modify file
• Step 3: Undo your stuff
• Step 4: View log
• Step 5: Tagging
• Step 6: Branching
• Step 7: Work with remotes
• Step 8: Advanced Git
Step 0: Env setting and help
• git config --list
• git config --global user.name
• git config --global user.email
• <ready to go!>
• git help <verb>
Step 1: Init project
• git init
• git add *
• git commit -m "init comment“
• git clone /path/to/.git
Step 2: Change and modify file(1)
from progit.org
Step 2: Change and modify file(2)
from progit.org
Step 2: Change and modify file(3)
• git status
• git add <file>
• git diff
• git diff --cached
• git commit -m "edit commit“
• git commit -a -m "auto commit“
• git mv
Step 3: Undo your stuff
• git revert <commit>
• git commit -m "undo last commit and re-commit" –amend
• git rm <file>
• git rm --cached <file>
• git reset <file>
• git checkout <version> <file>
Step 4: View log
• git log -1
• git log -p
• git log -p -2
• git log --stat
• git log --shortstat
• git log --pretty=oneline
• git log --pretty="%h %cn: %s“
• git log --pretty="%h %cn: %s" --graph
• git log --since/after/until/before=2.weeks/”2010-10-20”
Step 5: Tagging
• git tag
• git tag -l "a*“
• git tag <tag-name>
• git tag -a <tag-name> -m “comment”
• git show <tag-name>
• git tag <rev-hash>
• git push origin <tag-name>
• git push --tags
Step 6: Branching
• git branch
• git branch -v
• git branch <bname>
• git checkout <bname>
• git checkout -b <bname>
• git merge <bname>
• git add <conflict-file>
• git commit
• git branch --merged/--no-merged
• git rebase
• git rebase --continue/skip/abort
Step 7: Work with remotes
• git remote
• git remote -v
• git remote add <origin-name> /path/to/.git
• git remote show <origin-name>
• git pull
• git fetch
• git fetch <origin-name>
• git merge <origin-name>/master
• git remote rename <origin-name> <name-name>
• git remote rm <origin-name>
Step 8: Advanced Git
• Submodules
• Git servers
• Hosted Git
• Distributed Git
• Git internals
Git resources
• http://git-scm.com/
• http://progit.org/
• http://ktown.kde.org/~zrusin/git/git-cheat-sheet-large.png
• http://www.kernel.org/pub/software/scm/git/docs/
• http://www-cs-students.stanford.edu/~blynn/gitmagic/
• http://stackoverflow.com/questions/315911/git-for-
beginners-the-definitive-practical-guide
End

Weitere ähnliche Inhalte

Was ist angesagt?

Git: Why And How to
Git: Why And How toGit: Why And How to
Git: Why And How tolanhuonga3
 
Getting Started with Git and GitHub
Getting Started with Git and GitHubGetting Started with Git and GitHub
Getting Started with Git and GitHubRabiraj Khadka
 
EGit 3.0 and beyond
EGit 3.0 and beyondEGit 3.0 and beyond
EGit 3.0 and beyondmsohn
 
Git for standalone use
Git for standalone useGit for standalone use
Git for standalone useIkuru Kanuma
 
Git in the Enterprise: How to succeed at DevOps using Git and a monorepo
Git in the Enterprise: How to succeed at DevOps using Git and a monorepoGit in the Enterprise: How to succeed at DevOps using Git and a monorepo
Git in the Enterprise: How to succeed at DevOps using Git and a monorepoGina Bustos
 
Getting started With GIT
Getting started With GITGetting started With GIT
Getting started With GITGhadiAlGhosh
 
Exploring Git in Visual Studio 2013
Exploring Git in Visual Studio 2013Exploring Git in Visual Studio 2013
Exploring Git in Visual Studio 2013Sunny Sharma
 
Getting Into Git
Getting Into GitGetting Into Git
Getting Into GitRick Umali
 
Collaborative development using git, Session conducted at Model Engineering C...
Collaborative development using git, Session conducted at Model Engineering C...Collaborative development using git, Session conducted at Model Engineering C...
Collaborative development using git, Session conducted at Model Engineering C...Zyxware Technologies
 
Git - Drupalcamp Ireland Dublin 2010
Git - Drupalcamp Ireland Dublin 2010Git - Drupalcamp Ireland Dublin 2010
Git - Drupalcamp Ireland Dublin 2010alanburke
 
An introductory guide to GIT
An introductory guide to GITAn introductory guide to GIT
An introductory guide to GITAmith jayasekara
 

Was ist angesagt? (20)

Git
GitGit
Git
 
Gn unify git
Gn unify gitGn unify git
Gn unify git
 
Open source
Open sourceOpen source
Open source
 
Git: Why And How to
Git: Why And How toGit: Why And How to
Git: Why And How to
 
Getting Started with Git and GitHub
Getting Started with Git and GitHubGetting Started with Git and GitHub
Getting Started with Git and GitHub
 
EGit 3.0 and beyond
EGit 3.0 and beyondEGit 3.0 and beyond
EGit 3.0 and beyond
 
Git for standalone use
Git for standalone useGit for standalone use
Git for standalone use
 
Github
GithubGithub
Github
 
Git in the Enterprise: How to succeed at DevOps using Git and a monorepo
Git in the Enterprise: How to succeed at DevOps using Git and a monorepoGit in the Enterprise: How to succeed at DevOps using Git and a monorepo
Git in the Enterprise: How to succeed at DevOps using Git and a monorepo
 
Git-Basics
Git-BasicsGit-Basics
Git-Basics
 
Getting started With GIT
Getting started With GITGetting started With GIT
Getting started With GIT
 
Exploring Git in Visual Studio 2013
Exploring Git in Visual Studio 2013Exploring Git in Visual Studio 2013
Exploring Git in Visual Studio 2013
 
Getting Into Git
Getting Into GitGetting Into Git
Getting Into Git
 
Collaborative development using git, Session conducted at Model Engineering C...
Collaborative development using git, Session conducted at Model Engineering C...Collaborative development using git, Session conducted at Model Engineering C...
Collaborative development using git, Session conducted at Model Engineering C...
 
Gitmar
GitmarGitmar
Gitmar
 
Hacktoberfest 2021
Hacktoberfest 2021Hacktoberfest 2021
Hacktoberfest 2021
 
Git step by step
Git step by stepGit step by step
Git step by step
 
Git Primer
Git PrimerGit Primer
Git Primer
 
Git - Drupalcamp Ireland Dublin 2010
Git - Drupalcamp Ireland Dublin 2010Git - Drupalcamp Ireland Dublin 2010
Git - Drupalcamp Ireland Dublin 2010
 
An introductory guide to GIT
An introductory guide to GITAn introductory guide to GIT
An introductory guide to GIT
 

Ähnlich wie Git study notes

Introduction to Git.pptx
Introduction to Git.pptxIntroduction to Git.pptx
Introduction to Git.pptxgdscuds
 
Git workshop - University of Moratuwa, Department of Computer Science and Eng...
Git workshop - University of Moratuwa, Department of Computer Science and Eng...Git workshop - University of Moratuwa, Department of Computer Science and Eng...
Git workshop - University of Moratuwa, Department of Computer Science and Eng...WSO2
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An IntroductionBehzad Altaf
 
Git is a distributed version control system .
Git is a distributed version control system .Git is a distributed version control system .
Git is a distributed version control system .HELLOWorld889594
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configurationKishor Kumar
 
The Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubThe Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubBigBlueHat
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notesglen_a_smith
 
Git session Dropsolid.com
Git session Dropsolid.comGit session Dropsolid.com
Git session Dropsolid.comdropsolid
 
Git Tutorial I
Git Tutorial IGit Tutorial I
Git Tutorial IJim Yeh
 
Learn Git - For Beginners and Intermediate levels
Learn Git - For Beginners and Intermediate levelsLearn Git - For Beginners and Intermediate levels
Learn Git - For Beginners and Intermediate levelsGorav Singal
 
Git Ninja KT (GitHub to GitLab)
Git Ninja KT (GitHub to GitLab)Git Ninja KT (GitHub to GitLab)
Git Ninja KT (GitHub to GitLab)Ashok Kumar
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Gitatishgoswami
 
Let's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHubLet's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHubKim Moir
 
11 git version control
11 git version control11 git version control
11 git version controlWasim Alatrash
 

Ähnlich wie Git study notes (20)

Introduction to Git.pptx
Introduction to Git.pptxIntroduction to Git.pptx
Introduction to Git.pptx
 
Git workshop - University of Moratuwa, Department of Computer Science and Eng...
Git workshop - University of Moratuwa, Department of Computer Science and Eng...Git workshop - University of Moratuwa, Department of Computer Science and Eng...
Git workshop - University of Moratuwa, Department of Computer Science and Eng...
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An Introduction
 
Git is a distributed version control system .
Git is a distributed version control system .Git is a distributed version control system .
Git is a distributed version control system .
 
Git 基础
Git 基础Git 基础
Git 基础
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configuration
 
The Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubThe Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHub
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notes
 
Git session Dropsolid.com
Git session Dropsolid.comGit session Dropsolid.com
Git session Dropsolid.com
 
Git Tutorial I
Git Tutorial IGit Tutorial I
Git Tutorial I
 
Learn Git - For Beginners and Intermediate levels
Learn Git - For Beginners and Intermediate levelsLearn Git - For Beginners and Intermediate levels
Learn Git - For Beginners and Intermediate levels
 
Git Ninja KT (GitHub to GitLab)
Git Ninja KT (GitHub to GitLab)Git Ninja KT (GitHub to GitLab)
Git Ninja KT (GitHub to GitLab)
 
GIT-FirstPart.ppt
GIT-FirstPart.pptGIT-FirstPart.ppt
GIT-FirstPart.ppt
 
Advanted git
Advanted git Advanted git
Advanted git
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Let's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHubLet's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHub
 
Techoalien git
Techoalien gitTechoalien git
Techoalien git
 
Techoalien git
Techoalien gitTechoalien git
Techoalien git
 
Techoalien git
Techoalien gitTechoalien git
Techoalien git
 
11 git version control
11 git version control11 git version control
11 git version control
 

Kürzlich hochgeladen

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 

Kürzlich hochgeladen (20)

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 

Git study notes

  • 2. What’s Git? • Git is distributed version control system focused on speed, effectivity and real-world usability on large projects. Its highlights include: – Distributed development – Strong support for non-linear development – Efficient handling of large projects – Cryptographic authentication of history – Toolkit design
  • 3. Who is using Git? • Git • Linux Kernel • Perl • Gnome • Qt • Ruby on Rails • Android • PostgreSQL • Wine • Fedora • Debian • X.org • …. and you?
  • 4. Study Notes • Step 0: Environment setting and help • Step 1: Init project • Step 2: Change and modify file • Step 3: Undo your stuff • Step 4: View log • Step 5: Tagging • Step 6: Branching • Step 7: Work with remotes • Step 8: Advanced Git
  • 5. Step 0: Env setting and help • git config --list • git config --global user.name • git config --global user.email • <ready to go!> • git help <verb>
  • 6. Step 1: Init project • git init • git add * • git commit -m "init comment“ • git clone /path/to/.git
  • 7. Step 2: Change and modify file(1) from progit.org
  • 8. Step 2: Change and modify file(2) from progit.org
  • 9. Step 2: Change and modify file(3) • git status • git add <file> • git diff • git diff --cached • git commit -m "edit commit“ • git commit -a -m "auto commit“ • git mv
  • 10. Step 3: Undo your stuff • git revert <commit> • git commit -m "undo last commit and re-commit" –amend • git rm <file> • git rm --cached <file> • git reset <file> • git checkout <version> <file>
  • 11. Step 4: View log • git log -1 • git log -p • git log -p -2 • git log --stat • git log --shortstat • git log --pretty=oneline • git log --pretty="%h %cn: %s“ • git log --pretty="%h %cn: %s" --graph • git log --since/after/until/before=2.weeks/”2010-10-20”
  • 12. Step 5: Tagging • git tag • git tag -l "a*“ • git tag <tag-name> • git tag -a <tag-name> -m “comment” • git show <tag-name> • git tag <rev-hash> • git push origin <tag-name> • git push --tags
  • 13. Step 6: Branching • git branch • git branch -v • git branch <bname> • git checkout <bname> • git checkout -b <bname> • git merge <bname> • git add <conflict-file> • git commit • git branch --merged/--no-merged • git rebase • git rebase --continue/skip/abort
  • 14. Step 7: Work with remotes • git remote • git remote -v • git remote add <origin-name> /path/to/.git • git remote show <origin-name> • git pull • git fetch • git fetch <origin-name> • git merge <origin-name>/master • git remote rename <origin-name> <name-name> • git remote rm <origin-name>
  • 15. Step 8: Advanced Git • Submodules • Git servers • Hosted Git • Distributed Git • Git internals
  • 16. Git resources • http://git-scm.com/ • http://progit.org/ • http://ktown.kde.org/~zrusin/git/git-cheat-sheet-large.png • http://www.kernel.org/pub/software/scm/git/docs/ • http://www-cs-students.stanford.edu/~blynn/gitmagic/ • http://stackoverflow.com/questions/315911/git-for- beginners-the-definitive-practical-guide
  • 17. End