ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
What is Git?
Distributed version control system
Linus Torvalds - to track linux kernel development
Free and open source
Designed to handle small/large projects with speed and
efficiency
Fast branching and merging
Distributed vs Centralized
Basic git workflow
Initializing a git repo
# got some code in directory
$ git init [--bare]
# or clone
$ git clone --depth 1 ¨Cb <branch>
$ git clone /var/www/code.git
Then push to remote with upstream set for tracking
$ git push ¨Cu origin <master>
Example of gitignore
$ cat .gitignore
*.[oa]
*~ # ending with ~
*.a # no .a files
!lib.a # but do track lib.a, even though you're ignoring .a files above
/TODO # only ignore the root TODO file, not subdir/TODO
build/ # ignore all files in the build/ directory
doc/*.txt # ignore doc/notes.txt, but not doc/server/arch.txt
Doc/**/*.txt # all nested .txt files
Viewing staged and unstaged changes
? git status
? git diff (Compares working directory with staging area)
? git diff --staged
? git diff HEAD
? git diff v1.0 v1.1
? git diff master adposting
Branching
Branching
Creating new branch
$ git branch testing
$ git checkout testing
Basic branching and merging
$ git checkout iss53
Switched to branch "iss53"
$ vim index.html
$ git commit -a -m 'finished the new footer [issue 53]'
[iss53]: created ad82d7a: "finished the new footer [issue 53]"
1 files changed, 1 insertions(+), 0 deletions(-)
$ git checkout master
$ git merge iss53
Merge made by recursive.
README | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
Merging and Rebase
# Merging leaves short-term branch intact but rebase makes it non-divergent
$ git checkout experiment
$ git rebase master
First, rewinding head to replay your work on top of it... Applying: added staged
command
Branch management
$ git branch # Shows all the active branches
$ git branch -v # Shows last commit on each branch
$ git branch --merged # Shows which branches are merged with the branch you are on
$ git branch --no-merged # Shows all branches that contain work you haven¡¯t merged
$ git branch -d testing # To delete a branch. Will fail if the branch is not yet merged
Remote branches
# Branches are just reference
# as many branch as you may as remote
$ git fetch origin # Fetches any data you don¡¯t have from remote ¡®origin¡¯ repository
$ git pull origin # Fetches any data you don¡¯t have and merges it with local branch
$ git fetch origin master # Fetches data only from ¡®master¡¯ branch
$ git pull origin master # Fetches data from master and merges it with local master branch
git fetch origin
$ git push origin develop # Pushes data from local ¡®develop¡¯ branch to remote ¡®develop¡¯ branch
$ git push origin develop:release # Pushes data from local ¡®develop¡¯ branch to remote ¡®release¡¯ branch
Tagging and release
$ git tag -a v1.0.1 # applies v1.0.1 tag to current commit
$ git tag # To list all tags
$ git tag -1 ¡®v1.4.2*¡® # List all tags starting with 1.4.2
$ git tag -a v1.0.1 -m ¡®my version 1.0.1¡¯
$ git show v1.4
tag v1.4
Tagger: Scott Chacon <schacon@gee-mail.com>
Date: Mon Feb 9 14:45:11 2009 -0800
my version 1.4
commit 15027957951b64cf874c3557a0f3547bd83b3ff6
Merge: 4a447f7... a6b4c97...
Author: Scott Chacon <schacon@gee-mail.com>
Date: Sun Feb 8 19:02:46 2009 -0800
Merge branch 'experiment'
Tagging
$ git log --pretty=oneline
15027957951b64cf874c3557a0f3547bd83b3ff6 Merge branch 'experiment'
a6b4c97498bd301d84096da251c98a07c7723e65 beginning write support
0d52aaab4479697da7686c15f77a3d64d9165190 one more thing
Tar Later:
$ git tag -a v1.2 9fceb02
Git remote server
# HTTP and smart HTTP
# SSH and GIT protocol
Git config
$ git config --global core.editor emacs
$ git config --global user.name "John Doe"
$ git config --global user.eail johndoe@example.com
Has override like /etc/gitconfig -> ~/.gitconfig -> /.git/config
$ git config --global commit.template ~/.gitmessage.txt
Git attributes
.gitattributes
*.pbcpropj binary
*.docs diff=word
*.png diff=exif
*.pbxproj binary
Hooks
# to streamline workflows
# client side hook
# server-side hook
Bundling and archiving
# bundle to transfer git repo
# archive to provide just the files

More Related Content

What's hot (20)

Loading...git
Loading...gitLoading...git
Loading...git
Rafael Garc¨ªa
?
Get Good With Git
Get Good With GitGet Good With Git
Get Good With Git
Hoffman Lab
?
Intro to Git DevOps Tally Presentation 101615
Intro to Git DevOps Tally Presentation 101615Intro to Git DevOps Tally Presentation 101615
Intro to Git DevOps Tally Presentation 101615
Brian K. Vagnini
?
Git for beginner
Git for beginnerGit for beginner
Git for beginner
Trung Huynh
?
Undoing Things in Git
Undoing Things in GitUndoing Things in Git
Undoing Things in Git
gittower
?
Git Basics - RubyFest 2009
Git Basics - RubyFest 2009Git Basics - RubyFest 2009
Git Basics - RubyFest 2009
Ariejan de Vroom
?
Version Control with Git for Beginners
Version Control with Git for BeginnersVersion Control with Git for Beginners
Version Control with Git for Beginners
bryanbibat
?
Basic Git
Basic GitBasic Git
Basic Git
Knut Haugen
?
Git real slides
Git real slidesGit real slides
Git real slides
Lucas Couto
?
Git basic
Git basicGit basic
Git basic
Akbar Uddin
?
Git
GitGit
Git
Maks Charuk
?
Git github
Git githubGit github
Git github
Anurag Deb
?
Understanding about git
Understanding about gitUnderstanding about git
Understanding about git
Sothearin Ren
?
Git Basics (Professionals)
 Git Basics (Professionals) Git Basics (Professionals)
Git Basics (Professionals)
bryanbibat
?
Integrate gitolite with mantis
Integrate gitolite with mantisIntegrate gitolite with mantis
Integrate gitolite with mantis
Johnson Chou
?
Git beyond basics
Git   beyond basicsGit   beyond basics
Git beyond basics
Kalpa Pathum Welivitigoda
?
Git Magic: Versioning Files like a Boss
Git Magic: Versioning Files like a BossGit Magic: Versioning Files like a Boss
Git Magic: Versioning Files like a Boss
tmacwilliam
?
Lets Git Together
Lets Git TogetherLets Git Together
Lets Git Together
Rakesh Jha
?
Git introduction
Git introductionGit introduction
Git introduction
Kornel Lugosi
?
GIT: Content-addressable filesystem and Version Control System
GIT: Content-addressable filesystem and Version Control SystemGIT: Content-addressable filesystem and Version Control System
GIT: Content-addressable filesystem and Version Control System
Tommaso Visconti
?
Intro to Git DevOps Tally Presentation 101615
Intro to Git DevOps Tally Presentation 101615Intro to Git DevOps Tally Presentation 101615
Intro to Git DevOps Tally Presentation 101615
Brian K. Vagnini
?
Undoing Things in Git
Undoing Things in GitUndoing Things in Git
Undoing Things in Git
gittower
?
Version Control with Git for Beginners
Version Control with Git for BeginnersVersion Control with Git for Beginners
Version Control with Git for Beginners
bryanbibat
?
Understanding about git
Understanding about gitUnderstanding about git
Understanding about git
Sothearin Ren
?
Git Basics (Professionals)
 Git Basics (Professionals) Git Basics (Professionals)
Git Basics (Professionals)
bryanbibat
?
Integrate gitolite with mantis
Integrate gitolite with mantisIntegrate gitolite with mantis
Integrate gitolite with mantis
Johnson Chou
?
Git Magic: Versioning Files like a Boss
Git Magic: Versioning Files like a BossGit Magic: Versioning Files like a Boss
Git Magic: Versioning Files like a Boss
tmacwilliam
?
Lets Git Together
Lets Git TogetherLets Git Together
Lets Git Together
Rakesh Jha
?
GIT: Content-addressable filesystem and Version Control System
GIT: Content-addressable filesystem and Version Control SystemGIT: Content-addressable filesystem and Version Control System
GIT: Content-addressable filesystem and Version Control System
Tommaso Visconti
?

Similar to Get going with_git_ppt (20)

Git basics
Git basicsGit basics
Git basics
Amit Sawhney
?
Did you git yet?
Did you git yet?Did you git yet?
Did you git yet?
Michael Fong
?
Git the Docs: A fun, hands-on introduction to version control
Git the Docs: A fun, hands-on introduction to version controlGit the Docs: A fun, hands-on introduction to version control
Git the Docs: A fun, hands-on introduction to version control
Becky Todd
?
Git training
Git trainingGit training
Git training
eric7master
?
Git presentation
Git presentationGit presentation
Git presentation
James Cuzella
?
Getting some Git
Getting some GitGetting some Git
Getting some Git
BADR
?
Git Tech Talk
Git  Tech TalkGit  Tech Talk
Git Tech Talk
Chris Johnson
?
Learning Basic GIT Cmd
Learning Basic GIT CmdLearning Basic GIT Cmd
Learning Basic GIT Cmd
srinathcox
?
Git and github 101
Git and github 101Git and github 101
Git and github 101
Senthilkumar Gopal
?
Pro git - grasping it conceptually
Pro git - grasping it conceptuallyPro git - grasping it conceptually
Pro git - grasping it conceptually
seungzzang Kim
?
Introduction to Git for Artists
Introduction to Git for ArtistsIntroduction to Git for Artists
Introduction to Git for Artists
David Newbury
?
Git cheat-sheet
Git cheat-sheetGit cheat-sheet
Git cheat-sheet
MarcoRodas9
?
Git cheat-sheet 2021
Git cheat-sheet 2021Git cheat-sheet 2021
Git cheat-sheet 2021
Rana Faisal Haroon
?
GIT Basics
GIT BasicsGIT Basics
GIT Basics
Tagged Social
?
????? ??? ?? GIT
????? ??? ?? GIT????? ??? ?? GIT
????? ??? ?? GIT
???????? ??? ????? ????????? ?????
?
Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017
Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017
Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017
Codemotion
?
Embedded Systems: Lecture 12: Introduction to Git & GitHub (Part 3)
Embedded Systems: Lecture 12: Introduction to Git & GitHub (Part 3)Embedded Systems: Lecture 12: Introduction to Git & GitHub (Part 3)
Embedded Systems: Lecture 12: Introduction to Git & GitHub (Part 3)
Ahmed El-Arabawy
?
Git
GitGit
Git
Gayan Kalanamith Mannapperuma
?
Git Concepts, Commands and Connectivity
Git Concepts, Commands and ConnectivityGit Concepts, Commands and Connectivity
Git Concepts, Commands and Connectivity
Raja Soundaramourty
?
Git
GitGit
Git
Parag Gupta
?

Recently uploaded (20)

The Road to SAP S4HANA Cloud with SAP Activate.pptx
The Road to SAP S4HANA Cloud with SAP Activate.pptxThe Road to SAP S4HANA Cloud with SAP Activate.pptx
The Road to SAP S4HANA Cloud with SAP Activate.pptx
zsbaranyai
?
202408_JAWSPANKRATION_Introduction_of_Minaden.pdf
202408_JAWSPANKRATION_Introduction_of_Minaden.pdf202408_JAWSPANKRATION_Introduction_of_Minaden.pdf
202408_JAWSPANKRATION_Introduction_of_Minaden.pdf
NTTDOCOMO-ServiceInnovation
?
The effectiveness of ai powered educational tools in enhancing academic perfo...
The effectiveness of ai powered educational tools in enhancing academic perfo...The effectiveness of ai powered educational tools in enhancing academic perfo...
The effectiveness of ai powered educational tools in enhancing academic perfo...
aebhpmqaocxhydmajf
?
Leadership Spectrum by Sonam Sherpa at GDG Kathmandu March Monthly Meetup
Leadership Spectrum by Sonam Sherpa at GDG Kathmandu March Monthly MeetupLeadership Spectrum by Sonam Sherpa at GDG Kathmandu March Monthly Meetup
Leadership Spectrum by Sonam Sherpa at GDG Kathmandu March Monthly Meetup
GDG Kathmandu
?
Innovative Web Design | Malachite Technologies
Innovative Web Design | Malachite TechnologiesInnovative Web Design | Malachite Technologies
Innovative Web Design | Malachite Technologies
malachitetechnologie1
?
Sugarlab AI: How Much Does an XXX AI Porn Generator Cost in 2025
Sugarlab AI: How Much Does an XXX AI Porn Generator Cost in 2025Sugarlab AI: How Much Does an XXX AI Porn Generator Cost in 2025
Sugarlab AI: How Much Does an XXX AI Porn Generator Cost in 2025
Sugarlab AI
?
AuthZEN The OpenID Connect of Authorization - Gartner IAM EMEA 2025
AuthZEN The OpenID Connect of Authorization - Gartner IAM EMEA 2025AuthZEN The OpenID Connect of Authorization - Gartner IAM EMEA 2025
AuthZEN The OpenID Connect of Authorization - Gartner IAM EMEA 2025
David Brossard
?
Benefits of Moving Ellucian Banner to Oracle Cloud
Benefits of Moving Ellucian Banner to Oracle CloudBenefits of Moving Ellucian Banner to Oracle Cloud
Benefits of Moving Ellucian Banner to Oracle Cloud
AstuteBusiness
?
A General introduction to Ad ranking algorithms
A General introduction to Ad ranking algorithmsA General introduction to Ad ranking algorithms
A General introduction to Ad ranking algorithms
Buhwan Jeong
?
CIOs Speak Out - A Research Series by Jasper Colin
CIOs Speak Out - A Research Series by Jasper ColinCIOs Speak Out - A Research Series by Jasper Colin
CIOs Speak Out - A Research Series by Jasper Colin
Jasper Colin
?
APAC Solutions Challenge Info Session.pdf
APAC Solutions Challenge Info Session.pdfAPAC Solutions Challenge Info Session.pdf
APAC Solutions Challenge Info Session.pdf
GDG on Campus Monash
?
Getting the Best of TrueDEM ¨C April News & Updates
Getting the Best of TrueDEM ¨C April News & UpdatesGetting the Best of TrueDEM ¨C April News & Updates
Getting the Best of TrueDEM ¨C April News & Updates
panagenda
?
AI in Talent Acquisition: Boosting Hiring
AI in Talent Acquisition: Boosting HiringAI in Talent Acquisition: Boosting Hiring
AI in Talent Acquisition: Boosting Hiring
Beyond Chiefs
?
Research Data Management (RDM): the management of dat in the research process
Research Data Management (RDM): the management of dat in the research processResearch Data Management (RDM): the management of dat in the research process
Research Data Management (RDM): the management of dat in the research process
HeilaPienaar
?
Fast Screen Recorder v2.1.0.11 Crack Updated [April-2025]
Fast Screen Recorder v2.1.0.11 Crack Updated [April-2025]Fast Screen Recorder v2.1.0.11 Crack Updated [April-2025]
Fast Screen Recorder v2.1.0.11 Crack Updated [April-2025]
jackalen173
?
Automating Behavior-Driven Development: Boosting Productivity with Template-D...
Automating Behavior-Driven Development: Boosting Productivity with Template-D...Automating Behavior-Driven Development: Boosting Productivity with Template-D...
Automating Behavior-Driven Development: Boosting Productivity with Template-D...
DOCOMO Innovations, Inc.
?
Top Tips to Get Your Data AI-Ready? ? ?? ?
Top Tips to Get Your Data AI-Ready? ? ?? ?Top Tips to Get Your Data AI-Ready? ? ?? ?
Top Tips to Get Your Data AI-Ready? ? ?? ?
Precisely
?
Testing Tools for Accessibility Enhancement Part II.pptx
Testing Tools for Accessibility Enhancement Part II.pptxTesting Tools for Accessibility Enhancement Part II.pptx
Testing Tools for Accessibility Enhancement Part II.pptx
Julia Undeutsch
?
Commit Conf 2025 Bitnami Charts with Kubescape
Commit Conf 2025 Bitnami Charts with KubescapeCommit Conf 2025 Bitnami Charts with Kubescape
Commit Conf 2025 Bitnami Charts with Kubescape
Alfredo Garc¨ªa Lavilla
?
Beyond the life of a CISO - Head of Trust at GDG Kathmandu Monthly Meetup
Beyond the life of a CISO -  Head of Trust at GDG Kathmandu Monthly MeetupBeyond the life of a CISO -  Head of Trust at GDG Kathmandu Monthly Meetup
Beyond the life of a CISO - Head of Trust at GDG Kathmandu Monthly Meetup
GDG Kathmandu
?
The Road to SAP S4HANA Cloud with SAP Activate.pptx
The Road to SAP S4HANA Cloud with SAP Activate.pptxThe Road to SAP S4HANA Cloud with SAP Activate.pptx
The Road to SAP S4HANA Cloud with SAP Activate.pptx
zsbaranyai
?
The effectiveness of ai powered educational tools in enhancing academic perfo...
The effectiveness of ai powered educational tools in enhancing academic perfo...The effectiveness of ai powered educational tools in enhancing academic perfo...
The effectiveness of ai powered educational tools in enhancing academic perfo...
aebhpmqaocxhydmajf
?
Leadership Spectrum by Sonam Sherpa at GDG Kathmandu March Monthly Meetup
Leadership Spectrum by Sonam Sherpa at GDG Kathmandu March Monthly MeetupLeadership Spectrum by Sonam Sherpa at GDG Kathmandu March Monthly Meetup
Leadership Spectrum by Sonam Sherpa at GDG Kathmandu March Monthly Meetup
GDG Kathmandu
?
Innovative Web Design | Malachite Technologies
Innovative Web Design | Malachite TechnologiesInnovative Web Design | Malachite Technologies
Innovative Web Design | Malachite Technologies
malachitetechnologie1
?
Sugarlab AI: How Much Does an XXX AI Porn Generator Cost in 2025
Sugarlab AI: How Much Does an XXX AI Porn Generator Cost in 2025Sugarlab AI: How Much Does an XXX AI Porn Generator Cost in 2025
Sugarlab AI: How Much Does an XXX AI Porn Generator Cost in 2025
Sugarlab AI
?
AuthZEN The OpenID Connect of Authorization - Gartner IAM EMEA 2025
AuthZEN The OpenID Connect of Authorization - Gartner IAM EMEA 2025AuthZEN The OpenID Connect of Authorization - Gartner IAM EMEA 2025
AuthZEN The OpenID Connect of Authorization - Gartner IAM EMEA 2025
David Brossard
?
Benefits of Moving Ellucian Banner to Oracle Cloud
Benefits of Moving Ellucian Banner to Oracle CloudBenefits of Moving Ellucian Banner to Oracle Cloud
Benefits of Moving Ellucian Banner to Oracle Cloud
AstuteBusiness
?
A General introduction to Ad ranking algorithms
A General introduction to Ad ranking algorithmsA General introduction to Ad ranking algorithms
A General introduction to Ad ranking algorithms
Buhwan Jeong
?
CIOs Speak Out - A Research Series by Jasper Colin
CIOs Speak Out - A Research Series by Jasper ColinCIOs Speak Out - A Research Series by Jasper Colin
CIOs Speak Out - A Research Series by Jasper Colin
Jasper Colin
?
APAC Solutions Challenge Info Session.pdf
APAC Solutions Challenge Info Session.pdfAPAC Solutions Challenge Info Session.pdf
APAC Solutions Challenge Info Session.pdf
GDG on Campus Monash
?
Getting the Best of TrueDEM ¨C April News & Updates
Getting the Best of TrueDEM ¨C April News & UpdatesGetting the Best of TrueDEM ¨C April News & Updates
Getting the Best of TrueDEM ¨C April News & Updates
panagenda
?
AI in Talent Acquisition: Boosting Hiring
AI in Talent Acquisition: Boosting HiringAI in Talent Acquisition: Boosting Hiring
AI in Talent Acquisition: Boosting Hiring
Beyond Chiefs
?
Research Data Management (RDM): the management of dat in the research process
Research Data Management (RDM): the management of dat in the research processResearch Data Management (RDM): the management of dat in the research process
Research Data Management (RDM): the management of dat in the research process
HeilaPienaar
?
Fast Screen Recorder v2.1.0.11 Crack Updated [April-2025]
Fast Screen Recorder v2.1.0.11 Crack Updated [April-2025]Fast Screen Recorder v2.1.0.11 Crack Updated [April-2025]
Fast Screen Recorder v2.1.0.11 Crack Updated [April-2025]
jackalen173
?
Automating Behavior-Driven Development: Boosting Productivity with Template-D...
Automating Behavior-Driven Development: Boosting Productivity with Template-D...Automating Behavior-Driven Development: Boosting Productivity with Template-D...
Automating Behavior-Driven Development: Boosting Productivity with Template-D...
DOCOMO Innovations, Inc.
?
Top Tips to Get Your Data AI-Ready? ? ?? ?
Top Tips to Get Your Data AI-Ready? ? ?? ?Top Tips to Get Your Data AI-Ready? ? ?? ?
Top Tips to Get Your Data AI-Ready? ? ?? ?
Precisely
?
Testing Tools for Accessibility Enhancement Part II.pptx
Testing Tools for Accessibility Enhancement Part II.pptxTesting Tools for Accessibility Enhancement Part II.pptx
Testing Tools for Accessibility Enhancement Part II.pptx
Julia Undeutsch
?
Beyond the life of a CISO - Head of Trust at GDG Kathmandu Monthly Meetup
Beyond the life of a CISO -  Head of Trust at GDG Kathmandu Monthly MeetupBeyond the life of a CISO -  Head of Trust at GDG Kathmandu Monthly Meetup
Beyond the life of a CISO - Head of Trust at GDG Kathmandu Monthly Meetup
GDG Kathmandu
?

Get going with_git_ppt

  • 1. What is Git? Distributed version control system Linus Torvalds - to track linux kernel development Free and open source Designed to handle small/large projects with speed and efficiency Fast branching and merging
  • 4. Initializing a git repo # got some code in directory $ git init [--bare] # or clone $ git clone --depth 1 ¨Cb <branch> $ git clone /var/www/code.git Then push to remote with upstream set for tracking $ git push ¨Cu origin <master>
  • 5. Example of gitignore $ cat .gitignore *.[oa] *~ # ending with ~ *.a # no .a files !lib.a # but do track lib.a, even though you're ignoring .a files above /TODO # only ignore the root TODO file, not subdir/TODO build/ # ignore all files in the build/ directory doc/*.txt # ignore doc/notes.txt, but not doc/server/arch.txt Doc/**/*.txt # all nested .txt files
  • 6. Viewing staged and unstaged changes ? git status ? git diff (Compares working directory with staging area) ? git diff --staged ? git diff HEAD ? git diff v1.0 v1.1 ? git diff master adposting
  • 9. Creating new branch $ git branch testing $ git checkout testing
  • 10. Basic branching and merging $ git checkout iss53 Switched to branch "iss53" $ vim index.html $ git commit -a -m 'finished the new footer [issue 53]' [iss53]: created ad82d7a: "finished the new footer [issue 53]" 1 files changed, 1 insertions(+), 0 deletions(-) $ git checkout master $ git merge iss53 Merge made by recursive. README | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
  • 11. Merging and Rebase # Merging leaves short-term branch intact but rebase makes it non-divergent $ git checkout experiment $ git rebase master First, rewinding head to replay your work on top of it... Applying: added staged command
  • 12. Branch management $ git branch # Shows all the active branches $ git branch -v # Shows last commit on each branch $ git branch --merged # Shows which branches are merged with the branch you are on $ git branch --no-merged # Shows all branches that contain work you haven¡¯t merged $ git branch -d testing # To delete a branch. Will fail if the branch is not yet merged
  • 13. Remote branches # Branches are just reference # as many branch as you may as remote $ git fetch origin # Fetches any data you don¡¯t have from remote ¡®origin¡¯ repository $ git pull origin # Fetches any data you don¡¯t have and merges it with local branch $ git fetch origin master # Fetches data only from ¡®master¡¯ branch $ git pull origin master # Fetches data from master and merges it with local master branch git fetch origin $ git push origin develop # Pushes data from local ¡®develop¡¯ branch to remote ¡®develop¡¯ branch $ git push origin develop:release # Pushes data from local ¡®develop¡¯ branch to remote ¡®release¡¯ branch
  • 14. Tagging and release $ git tag -a v1.0.1 # applies v1.0.1 tag to current commit $ git tag # To list all tags $ git tag -1 ¡®v1.4.2*¡® # List all tags starting with 1.4.2 $ git tag -a v1.0.1 -m ¡®my version 1.0.1¡¯ $ git show v1.4 tag v1.4 Tagger: Scott Chacon <schacon@gee-mail.com> Date: Mon Feb 9 14:45:11 2009 -0800 my version 1.4 commit 15027957951b64cf874c3557a0f3547bd83b3ff6 Merge: 4a447f7... a6b4c97... Author: Scott Chacon <schacon@gee-mail.com> Date: Sun Feb 8 19:02:46 2009 -0800 Merge branch 'experiment'
  • 15. Tagging $ git log --pretty=oneline 15027957951b64cf874c3557a0f3547bd83b3ff6 Merge branch 'experiment' a6b4c97498bd301d84096da251c98a07c7723e65 beginning write support 0d52aaab4479697da7686c15f77a3d64d9165190 one more thing Tar Later: $ git tag -a v1.2 9fceb02
  • 16. Git remote server # HTTP and smart HTTP # SSH and GIT protocol
  • 17. Git config $ git config --global core.editor emacs $ git config --global user.name "John Doe" $ git config --global user.eail johndoe@example.com Has override like /etc/gitconfig -> ~/.gitconfig -> /.git/config $ git config --global commit.template ~/.gitmessage.txt
  • 18. Git attributes .gitattributes *.pbcpropj binary *.docs diff=word *.png diff=exif *.pbxproj binary
  • 19. Hooks # to streamline workflows # client side hook # server-side hook
  • 20. Bundling and archiving # bundle to transfer git repo # archive to provide just the files