SlideShare a Scribd company logo
Foobarsystem Co.,LTD
@nolifelover
Git & Gitflow
Foobarsystem Co.,LTD
What is Git?
● Git is VCS, SCM
● Distributed Version Control Systems
(DVCSs)
● Other SVN, Mercurial
Foobarsystem Co.,LTD
What is DVCSs
Distributed Version Control Systems
Foobarsystem Co.,LTD
What can git do?
● Tracking code changes
● Branching
● Tagging
● Merging
● Rollback
● ...
Foobarsystem Co.,LTD
How does it work?
● Tracking changes in files.
● Committing changes.
● Working directory, Staging area and the
remote repository
● .git folder
Foobarsystem Co.,LTD
Local Operations
● Git directory
● Working directory
● Staging area
Foobarsystem Co.,LTD
Remote Operations
Foobarsystem Co.,LTD
Getting started
● Installing http://git-scm.com/
● configuring git
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com
$ git config --global credential.helper cache
$ git config --global credential.helper "cache --timeout=3600"
$ git config --list
Foobarsystem Co.,LTD
Basic linux commands
● pwd
● ls -ah
● cd
● mv
● rm
● cp
● touch
Foobarsystem Co.,LTD
Initializing a Repository
➔ git status: show the current git repo status
➔ git init: Initializing git repo
Add .git folder for repo setting
Foobarsystem Co.,LTD
First commit
➔ touch readme : create a new readme file
➔ edit readme : use favorite text editor
➔ git status : show the current git repo status
➔ git add : Adds file to track or submit changes
to commit
➔ git commit -m “commit message” : commits
changes in added files
➔ git rm <filename> : Delete a file
Foobarsystem Co.,LTD
Commit history
git log : show commited log and information
git log --since=2.weeks
git diff <file> : compare local change and
current commit
Foobarsystem Co.,LTD
Undoing Things
➔ git reset HEAD <file> : unstaging a staged
file
➔ git checkout <file> : unmodify a modify file
Foobarsystem Co.,LTD
Branching
git branch : show branches and current branch
git checkout -b <branchname> : create and
checkout the new branch from current branch
git branch -d <branchname> : delete specified
branch
Foobarsystem Co.,LTD
Working with remote
➔ git remote add <shortname> <remote repo>
➔ git remote : show current remote link
➔ git remote -v : show shortname and url
remote respository
➔ git push -u origin master
Foobarsystem Co.,LTD
Pushing and fetching
➔ git push origin master : Pushed commits to
origin remote
➔ git fetch origin : checks the latest in origin
➔ git merge origin/master : merge
origin/master with local current branch
➔ git pull : merge remote repository to current
local repository
Foobarsystem Co.,LTD
Conflicts
● When merging modified file from remote with
modified file in local repo
Foobarsystem Co.,LTD
Git ignoring files
$ cat .gitignore
# a comment - this is ignored
# no .a files
*.a
# but do track lib.a, even though you're ignoring .a files above
!lib.a
# only ignore the root TODO file, not subdir/TODO
/TODO
# ignore all files in the build/ directory
build/
# ignore doc/notes.txt, but not doc/server/arch.txt
doc/*.txt
# ignore all .txt files in the doc/ directory
doc/**/*.txt
Foobarsystem Co.,LTD
Git Flow
Git Work Flow
Foobarsystem Co.,LTD
Foobarsystem Co.,LTD
Why gitflow?
● Based on the graph previous slide
● Shortcuts for repetitive tasks
● Branch naming convention
“<prefix>/<name>”
● Fast to develop
● 2 Main branches
Foobarsystem Co.,LTD
Main branches
master : for production
develop : for ??
Suport branch
● Feature branches
● Release branches
● Hotfix branches
Foobarsystem Co.,LTD
Feature branches
May branch off from:
develop
Must merge back into:
develop
Naming convention:
anything except master,
develop, release-*, or hotfix-*
Foobarsystem Co.,LTD
References
● http://www.slideshare.net/ammarlakis/git-workshop-33610244
● http://www.slideshare.net/cajones2013/git-for
● https://training.github.com/kit/downloads/github-git-cheat-sheet.pdf
● http://nvie.com/posts/a-successful-git-branching-model/
● http://danielkummer.github.io/git-flow-cheatsheet/
Ad

More Related Content

What's hot (20)

git flow
git flowgit flow
git flow
Gabriel Gottgtroy Zigolis
 
Git workflows
Git workflowsGit workflows
Git workflows
Sergiu Savva
 
Git and git flow
Git and git flowGit and git flow
Git and git flow
Fran García
 
Git-flow workflow and pull-requests
Git-flow workflow and pull-requestsGit-flow workflow and pull-requests
Git-flow workflow and pull-requests
Bartosz Kosarzycki
 
Git Flow - An Introduction
Git Flow - An IntroductionGit Flow - An Introduction
Git Flow - An Introduction
Knoldus Inc.
 
My Git workflow
My Git workflowMy Git workflow
My Git workflow
Rui Carvalho
 
Git Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-FlowGit Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-Flow
Mikhail Melnik
 
Why Aren't You Using Git Flow?
Why Aren't You Using Git Flow?Why Aren't You Using Git Flow?
Why Aren't You Using Git Flow?
John Congdon
 
An introduction to Git and GitFlow
An introduction to Git and GitFlowAn introduction to Git and GitFlow
An introduction to Git and GitFlow
Mark Everard
 
Git flow
Git flowGit flow
Git flow
Valerio Como
 
Git with the flow
Git with the flowGit with the flow
Git with the flow
Dana White
 
Git workflows
Git workflowsGit workflows
Git workflows
Thuc Le Dong
 
Git Tricks — git utilities that make life git easier
Git Tricks — git utilities that make life git easierGit Tricks — git utilities that make life git easier
Git Tricks — git utilities that make life git easier
Christoph Matthies
 
Web development, from git flow to github flow
Web development, from git flow to github flowWeb development, from git flow to github flow
Web development, from git flow to github flow
Caesar Chi
 
Git introduction for Beginners
Git introduction for BeginnersGit introduction for Beginners
Git introduction for Beginners
MortezaTaghaddomi
 
The gitflow way
The gitflow wayThe gitflow way
The gitflow way
Ruijun Li
 
DcATL 2013: Git-Flow for Daily Use
DcATL 2013: Git-Flow for Daily UseDcATL 2013: Git-Flow for Daily Use
DcATL 2013: Git-Flow for Daily Use
Mediacurrent
 
Git and GitHub workflows
Git and GitHub workflowsGit and GitHub workflows
Git and GitHub workflows
Arthur Shvetsov
 
Git flow cheatsheet
Git flow cheatsheetGit flow cheatsheet
Git flow cheatsheet
Funato Takashi
 
Git workflows
Git workflowsGit workflows
Git workflows
Xpand IT
 
Git-flow workflow and pull-requests
Git-flow workflow and pull-requestsGit-flow workflow and pull-requests
Git-flow workflow and pull-requests
Bartosz Kosarzycki
 
Git Flow - An Introduction
Git Flow - An IntroductionGit Flow - An Introduction
Git Flow - An Introduction
Knoldus Inc.
 
Git Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-FlowGit Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-Flow
Mikhail Melnik
 
Why Aren't You Using Git Flow?
Why Aren't You Using Git Flow?Why Aren't You Using Git Flow?
Why Aren't You Using Git Flow?
John Congdon
 
An introduction to Git and GitFlow
An introduction to Git and GitFlowAn introduction to Git and GitFlow
An introduction to Git and GitFlow
Mark Everard
 
Git with the flow
Git with the flowGit with the flow
Git with the flow
Dana White
 
Git Tricks — git utilities that make life git easier
Git Tricks — git utilities that make life git easierGit Tricks — git utilities that make life git easier
Git Tricks — git utilities that make life git easier
Christoph Matthies
 
Web development, from git flow to github flow
Web development, from git flow to github flowWeb development, from git flow to github flow
Web development, from git flow to github flow
Caesar Chi
 
Git introduction for Beginners
Git introduction for BeginnersGit introduction for Beginners
Git introduction for Beginners
MortezaTaghaddomi
 
The gitflow way
The gitflow wayThe gitflow way
The gitflow way
Ruijun Li
 
DcATL 2013: Git-Flow for Daily Use
DcATL 2013: Git-Flow for Daily UseDcATL 2013: Git-Flow for Daily Use
DcATL 2013: Git-Flow for Daily Use
Mediacurrent
 
Git and GitHub workflows
Git and GitHub workflowsGit and GitHub workflows
Git and GitHub workflows
Arthur Shvetsov
 
Git workflows
Git workflowsGit workflows
Git workflows
Xpand IT
 

Similar to Git & gitflow (20)

Pro git - grasping it conceptually
Pro git - grasping it conceptuallyPro git - grasping it conceptually
Pro git - grasping it conceptually
seungzzang Kim
 
Getting some Git
Getting some GitGetting some Git
Getting some Git
BADR
 
Loading...git
Loading...gitLoading...git
Loading...git
Rafael García
 
Git Tech Talk
Git  Tech TalkGit  Tech Talk
Git Tech Talk
Chris Johnson
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
gdsc13
 
Git training v10
Git training v10Git training v10
Git training v10
Skander Hamza
 
The Fundamentals of Git
The Fundamentals of GitThe Fundamentals of Git
The Fundamentals of Git
DivineOmega
 
Improving your workflow with git
Improving your workflow with gitImproving your workflow with git
Improving your workflow with git
Dídac Ríos
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git Tutorial
Sage Sharp
 
Git basic
Git basicGit basic
Git basic
Emran Ul Hadi
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An Introduction
Behzad Altaf
 
git-and-bitbucket
git-and-bitbucketgit-and-bitbucket
git-and-bitbucket
azwildcat
 
Git presentation
Git presentationGit presentation
Git presentation
James Cuzella
 
Git
GitGit
Git
Terry Wang
 
Git 入门与实践
Git 入门与实践Git 入门与实践
Git 入门与实践
Terry Wang
 
Git
GitGit
Git
Gayan Kalanamith Mannapperuma
 
Git 入门 与 实践
Git 入门 与 实践Git 入门 与 实践
Git 入门 与 实践
Terry Wang
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github
Max Claus Nunes
 
Git Started With Git
Git Started With GitGit Started With Git
Git Started With Git
Nick Quaranto
 
Git github
Git githubGit github
Git github
Anurag Deb
 
Pro git - grasping it conceptually
Pro git - grasping it conceptuallyPro git - grasping it conceptually
Pro git - grasping it conceptually
seungzzang Kim
 
Getting some Git
Getting some GitGetting some Git
Getting some Git
BADR
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
gdsc13
 
The Fundamentals of Git
The Fundamentals of GitThe Fundamentals of Git
The Fundamentals of Git
DivineOmega
 
Improving your workflow with git
Improving your workflow with gitImproving your workflow with git
Improving your workflow with git
Dídac Ríos
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git Tutorial
Sage Sharp
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An Introduction
Behzad Altaf
 
git-and-bitbucket
git-and-bitbucketgit-and-bitbucket
git-and-bitbucket
azwildcat
 
Git 入门与实践
Git 入门与实践Git 入门与实践
Git 入门与实践
Terry Wang
 
Git 入门 与 实践
Git 入门 与 实践Git 入门 与 实践
Git 入门 与 实践
Terry Wang
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github
Max Claus Nunes
 
Git Started With Git
Git Started With GitGit Started With Git
Git Started With Git
Nick Quaranto
 
Ad

Recently uploaded (20)

Adobe Master Collection CC Crack Advance Version 2025
Adobe Master Collection CC Crack Advance Version 2025Adobe Master Collection CC Crack Advance Version 2025
Adobe Master Collection CC Crack Advance Version 2025
kashifyounis067
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
How can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptxHow can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptx
laravinson24
 
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Orangescrum
 
Maxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINKMaxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINK
younisnoman75
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
FL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full VersionFL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full Version
tahirabibi60507
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New VersionPixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
saimabibi60507
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AIScaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
danshalev
 
Adobe Master Collection CC Crack Advance Version 2025
Adobe Master Collection CC Crack Advance Version 2025Adobe Master Collection CC Crack Advance Version 2025
Adobe Master Collection CC Crack Advance Version 2025
kashifyounis067
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
How can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptxHow can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptx
laravinson24
 
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Orangescrum
 
Maxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINKMaxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINK
younisnoman75
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
FL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full VersionFL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full Version
tahirabibi60507
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New VersionPixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
saimabibi60507
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AIScaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
danshalev
 
Ad

Git & gitflow