SlideShare a Scribd company logo
Introducing : git + gitflow
Sebin Benjamin,
Software Engineer
Lulu International Exchange
What is git ?
Git is an open source, distributed version control system designed for speed and
efficiency.
● Every developer “clones” a copy of a repository and has the full history of the
project on their own hard drive. This copy (or “clone”) has all of the metadata
of the original.
● Enables you to track changes, when they happened, and who made them.
● Revert to different versions if needed
● Develop in parallel using branches
● Easier to collaborate with other developers
What is git ?
● Git creates a .git folder (in the current folder) to store the details of the file
system - this folder contains all the data required to track your files and is
known as a repository, or repo.
● Git has got branches which allow you to work on a copy of the code without
destroying the original.
Centralized VCS
Introducing Git and git flow
Distributed VCS
Introducing Git and git flow
https://try.github.io
● Working tree
● Staging area
● Git directory
Sections of a Git project
http://rogerdudler.github.io
/git-guide/
Commits, the basic building blocks
● Code is wrapped into commits
● One thing added per commit
● Commits should have useful names
● git log lists the commits made in that repository in reverse chronological order
● lists each commit with its (40 char) SHA-1 checksum, the author’s name and
email, the date written, and the commit message
$ git log
commit ca82a6dff817ec66f44342007202690a93763949
Author: Scott Chacon <schacon@gee-mail.com>
Date: Mon Mar 17 21:52:11 2008 -0700
changed the version number
commit 085bb3bcb608e1e8451d4b2432f8ecbe6306e7e7
Author: Scott Chacon <schacon@gee-mail.com>
Date: Sat Mar 15 16:40:33 2008 -0700
removed unnecessary test
commit a11bef06a3f659402fe7563abf99ad00de2209e6
Author: Scott Chacon <schacon@gee-mail.com>
Date: Sat Mar 15 10:31:28 2008 -0700
first commit
Introducing Git and git flow
Commit messages
Should be detailed and be descriptive and follow a format.
● Write commit messages as a sentence
● Make sure one commit does just one thing
● Capitalize sentences.
Use either:
● Present tense of the commit does
● A description of what the changes in the code does
● Example : fix off by one error in the Bar loop
Tags
● Tags are pointers to a commit of particular significance. Some examples of
these are for marking versions of your product or important changes.
● Right click on the commit you'd like to tag, and select create tag here at the
bottom.
● Tags are similar to branches, but tags are static pointers to a particular
commit, whereas when you add a new commit to a branch, the head of the
branch moves to point to the new commit.
● If you would want to make the tag available on a remote, just right click the tag
and select to push the tag to the remote.
Branches
● Branching means you diverge from the main line of development and
continue to do work without messing with that main line
● Git branches is incredibly lightweight, making branching operations nearly
instantaneous, and switching back and forth between branches generally just
as fast
Merging
● Merging takes the commits on two different branches and combines them.
● Files are automatically merged, unless their are two conflicting set of changes
(merge conflicts) , i.e. commits on the different branches updating the same
line in different ways.
https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell
https://support.gitkraken.com/repositories/local
.gitignore
● From time to time, there are files/folders you don't want Git to check in to git
repository.
● A .gitignore file should be committed into your repository to share the ignore
rules with any other users that clone the repository.
● Example:
sebin@home:~$ cat .gitignore
# Build Files #
bin
target
build/
.gradle https://github.com/github/gitignore
https://git-scm.com/docs/gitignore
Command line instructions - cloning
Git global setup
git config --global user.name "Jenkins"
git config --global user.email "jenkins@devops.com"
Cloning a new repository
git clone http://jenkins@172.30.13.20:8025/utility-apps/remind-me.git
cd remind-me
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
Adding existing folder to new repository
cd existing_folder
git init
git remote add origin http://jenkins@172.30.13.20:8025/utility-apps/remind-me.git
git add .
git commit
git push -u origin master
Pushing an existing Git repository
cd existing_repo
git remote add origin http://jenkins@172.30.13.20:8025/utility-apps/remind-me.git
git push -u origin --all
git push -u origin --tags
git clients
Users can manage Git primarily from
the command line, however, there
are several graphical user interface
(GUI) Git clients that facilitate
efficient and reliable usage of Git on
a desktop and offer most, if not all of
the command line operations.
- Gitkraken
- Source Tree
gitflow
- a branching model for Git...
GitFlow is a list of rules to keep a
repo’s history organized, and is
used to make the release process,
bug fixes, and feature creation
easier.
http://nvie.com/img/git-model@2x.png
The main branches
● master
○ origin/master to be the main branch where the source code of HEAD always
reflects a production-ready state
● develop
○ origin/develop to be the main branch where the source code of HEAD always
reflects a state with the latest delivered development changes for the next
release. Some would call this the “integration branch”.
Introducing Git and git flow
Supporting branches
A variety of supporting branches aid parallel development between team members,
ease tracking of features, prepare for production releases and to assist in quickly
fixing live production problems.
These branches always have a limited lifetime, since they will be removed
eventually.
Branches are not “special” from a technical perspective. The branch types are
categorized by how we use them. They are of course plain old Git branches.
The different types of branches we may use are:
● Feature branches
● Release branches
● Hotfix branches
● May branch off from:
develop
● Must merge back into:
develop
● Branch naming convention:
anything except master, develop, release-*, or hotfix-*
● Feature branches (or sometimes called topic branches) are used to develop
new features for the upcoming or a distant future release.
Feature branches
● Exists as long as the feature is in development, but will
eventually be merged back into develop (to definitely
add the new feature to the upcoming release) or
discarded (in case of a disappointing experiment).
Feature branches
Release branches
● May branch off from:
develop
● Must merge back into:
develop and master
● Branch naming convention:
release-*
● Support preparation of a new production release.
● Allows for last-minute dotting of i’s and crossing t’s.
● Allow for minor bug fixes and preparing metadata for a release (version
number, build dates, etc.).
● develop branch is cleared to receive features for the next big release, once
the release branch is created
● At least all features that are targeted for the release-to-be-built must be
merged into develop at this point in time.
● All features targeted at future releases may not—they must wait until after the
release branch is branched off.
● When the state of the release branch is ready to become a real release,
release branch is merged into master and develop
● Commit on master must be tagged for easy future reference to this historical
version
Hotfix branches
● May branch off from:
master
● Must merge back into:
develop and master
● Branch naming convention:
hotfix-*
Hotfix branches are very much like release
branches in that they are also meant to prepare
for a new production release, albeit unplanned.
Hotfix branches
● When a critical bug in a production version
must be resolved immediately, a hotfix
branch may be branched off from the
corresponding tag on the master branch that
marks the production version.
● Team members (on the develop branch) can
continue, while another person is preparing a
quick production fix.
● Exception to the rule here is that, when a
release branch currently exists, the hotfix
changes need to be merged into that
release branch, instead of develop.
Git client support
● Gitkraken -
https://support.gitkraken.com/repositories/git-flow
● Added benefit of adding all features, hotfixes, and
release branches in different folders.
● Prefix for the GitFlow branch type will allow gui to
recognize it as being a GitFlow branch, i.e.
feature/branch-name. Any branches that do not
have the prefix, will be displayed in the local
repository section, but not in the GitFlow menu.
Introducing Git and git flow
If you do not currently have these branches in your local repository, GitKraken
will create them when GitFlow is initialized.
Introducing Git and git flow
Color Conventions - Gitkraken
Red - File deleted
Green - File added (new file)
Orange - File modified
Branch naming conventions
● Use dashes (-) to separate parts of your branch names
● Do not use bare numbers as leading parts. Eg: 5450124-bug-remit
● Avoid long descriptive names. Eg: avoid remit-temporary-fix-for-live-important
● Avoid use of capital letters
● Identifiers from corresponding tickets in an external service (eg. a GitHub
issue) are also good candidates for use in branch names. Eg : bug ID’s in yodiz
or other issue reporting tools
https://github.com/agis/git-style-guide
References
● “How GitHub will save the World Economy” - Scott Chacon
https://github.com/schacon/git-presentations/tree/master/git_world_economy_talk
● An Introduction to Collaborating with Version Control
https://learn.adafruit.com/an-introduction-to-collaborating-with-version-control/overview
● Git book
https://git-scm.com/book/en/v2/
● Ignoring files - Github help
https://help.github.com/articles/ignoring-files/
● A successful Git branching model
http://nvie.com/posts/a-successful-git-branching-model/
● GitFlow in Gitkraken
https://support.gitkraken.com/repositories/git-flow
Thank you
Ad

More Related Content

What's hot (20)

Getting started With GIT
Getting started With GITGetting started With GIT
Getting started With GIT
GhadiAlGhosh
 
News from Git in Eclipse - EclipseCon EU - 2016-10-26
News from Git in Eclipse - EclipseCon EU - 2016-10-26News from Git in Eclipse - EclipseCon EU - 2016-10-26
News from Git in Eclipse - EclipseCon EU - 2016-10-26
msohn
 
Github 101 An Adventurer's Guide To Open Source
Github 101   An Adventurer's Guide To Open SourceGithub 101   An Adventurer's Guide To Open Source
Github 101 An Adventurer's Guide To Open Source
Prachitibhukan
 
Git and github fundamentals
Git and github fundamentalsGit and github fundamentals
Git and github fundamentals
RajKharvar
 
Github Case Study By Amil Ali
Github Case Study By Amil AliGithub Case Study By Amil Ali
Github Case Study By Amil Ali
AmilAli1
 
Helios in Action: Git at Eclipse
Helios in Action: Git at EclipseHelios in Action: Git at Eclipse
Helios in Action: Git at Eclipse
Chris Aniszczyk
 
Intro to Git & GitHub
Intro to Git & GitHubIntro to Git & GitHub
Intro to Git & GitHub
Google Developer Students Club NIT Silchar
 
Git in Eclipse
Git in EclipseGit in Eclipse
Git in Eclipse
Dariusz Łuksza
 
Open source
Open sourceOpen source
Open source
onaelmangabo
 
Github
GithubGithub
Github
MeetPatel710
 
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and Github
Wycliff1
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
Yan Vugenfirer
 
Brush up on using github
Brush up on using githubBrush up on using github
Brush up on using github
Sebin Benjamin
 
Git Introduction
Git IntroductionGit Introduction
Git Introduction
Anil Wadghule
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github
Max Claus Nunes
 
Git strategies for DevOps
Git strategies for DevOpsGit strategies for DevOps
Git strategies for DevOps
Ahmad Iqbal Ali
 
Intro to git and git hub
Intro to git and git hubIntro to git and git hub
Intro to git and git hub
JasleenSondhi
 
Git hub visualstudiocode
Git hub visualstudiocodeGit hub visualstudiocode
Git hub visualstudiocode
Rolands Krumbergs
 
Version control
Version controlVersion control
Version control
Giovanni Marco Dall'Olio
 
Git
GitGit
Git
ropiku
 
Getting started With GIT
Getting started With GITGetting started With GIT
Getting started With GIT
GhadiAlGhosh
 
News from Git in Eclipse - EclipseCon EU - 2016-10-26
News from Git in Eclipse - EclipseCon EU - 2016-10-26News from Git in Eclipse - EclipseCon EU - 2016-10-26
News from Git in Eclipse - EclipseCon EU - 2016-10-26
msohn
 
Github 101 An Adventurer's Guide To Open Source
Github 101   An Adventurer's Guide To Open SourceGithub 101   An Adventurer's Guide To Open Source
Github 101 An Adventurer's Guide To Open Source
Prachitibhukan
 
Git and github fundamentals
Git and github fundamentalsGit and github fundamentals
Git and github fundamentals
RajKharvar
 
Github Case Study By Amil Ali
Github Case Study By Amil AliGithub Case Study By Amil Ali
Github Case Study By Amil Ali
AmilAli1
 
Helios in Action: Git at Eclipse
Helios in Action: Git at EclipseHelios in Action: Git at Eclipse
Helios in Action: Git at Eclipse
Chris Aniszczyk
 
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and Github
Wycliff1
 
Brush up on using github
Brush up on using githubBrush up on using github
Brush up on using github
Sebin Benjamin
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github
Max Claus Nunes
 
Git strategies for DevOps
Git strategies for DevOpsGit strategies for DevOps
Git strategies for DevOps
Ahmad Iqbal Ali
 
Intro to git and git hub
Intro to git and git hubIntro to git and git hub
Intro to git and git hub
JasleenSondhi
 

Similar to Introducing Git and git flow (20)

Git for developers
Git for developersGit for developers
Git for developers
Hacen Dadda
 
Git and GitHub workflows
Git and GitHub workflowsGit and GitHub workflows
Git and GitHub workflows
Arthur Shvetsov
 
Git flow Introduction
Git flow IntroductionGit flow Introduction
Git flow Introduction
David Paluy
 
Git usage (Basics and workflow)
Git usage (Basics and workflow)Git usage (Basics and workflow)
Git usage (Basics and workflow)
Yeasin Abedin
 
Git 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawanGit 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawan
James Ford
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
mobaires
 
Git basics a starter on git and its ecosystem
Git basics  a starter on git and its ecosystemGit basics  a starter on git and its ecosystem
Git basics a starter on git and its ecosystem
François D'Agostini
 
Git Basics
Git BasicsGit Basics
Git Basics
Ryan Condron
 
Formation git
Formation gitFormation git
Formation git
Ghariani Tewfik
 
Git
GitGit
Git
Mayank Patel
 
Mini-training: Let’s Git It!
Mini-training: Let’s Git It!Mini-training: Let’s Git It!
Mini-training: Let’s Git It!
Betclic Everest Group Tech Team
 
Git from the trenches
Git from the trenchesGit from the trenches
Git from the trenches
Nuno Caneco
 
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
 
GIT_Overview.
GIT_Overview.GIT_Overview.
GIT_Overview.
Mithilesh Singh
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing self
Chen-Tien Tsai
 
Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practice
Majid Hosseini
 
Version control and GIT Primer
Version control and GIT PrimerVersion control and GIT Primer
Version control and GIT Primer
saadulde
 
Git introduction
Git introductionGit introduction
Git introduction
satyendrajaladi
 
Vincit Teatime 2015.2 - Otto Kekäläinen: Don't be a git
Vincit Teatime 2015.2 - Otto Kekäläinen: Don't be a gitVincit Teatime 2015.2 - Otto Kekäläinen: Don't be a git
Vincit Teatime 2015.2 - Otto Kekäläinen: Don't be a git
VincitOy
 
Git essentials
Git essentialsGit essentials
Git essentials
Otto Kekäläinen
 
Git for developers
Git for developersGit for developers
Git for developers
Hacen Dadda
 
Git and GitHub workflows
Git and GitHub workflowsGit and GitHub workflows
Git and GitHub workflows
Arthur Shvetsov
 
Git flow Introduction
Git flow IntroductionGit flow Introduction
Git flow Introduction
David Paluy
 
Git usage (Basics and workflow)
Git usage (Basics and workflow)Git usage (Basics and workflow)
Git usage (Basics and workflow)
Yeasin Abedin
 
Git 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawanGit 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawan
James Ford
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
mobaires
 
Git basics a starter on git and its ecosystem
Git basics  a starter on git and its ecosystemGit basics  a starter on git and its ecosystem
Git basics a starter on git and its ecosystem
François D'Agostini
 
Git from the trenches
Git from the trenchesGit from the trenches
Git from the trenches
Nuno Caneco
 
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
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing self
Chen-Tien Tsai
 
Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practice
Majid Hosseini
 
Version control and GIT Primer
Version control and GIT PrimerVersion control and GIT Primer
Version control and GIT Primer
saadulde
 
Vincit Teatime 2015.2 - Otto Kekäläinen: Don't be a git
Vincit Teatime 2015.2 - Otto Kekäläinen: Don't be a gitVincit Teatime 2015.2 - Otto Kekäläinen: Don't be a git
Vincit Teatime 2015.2 - Otto Kekäläinen: Don't be a git
VincitOy
 
Ad

Recently uploaded (20)

Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Ranjan Baisak
 
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
 
Minitab 22 Full Crack Plus Product Key Free Download [Latest] 2025
Minitab 22 Full Crack Plus Product Key Free Download [Latest] 2025Minitab 22 Full Crack Plus Product Key Free Download [Latest] 2025
Minitab 22 Full Crack Plus Product Key Free Download [Latest] 2025
wareshashahzadiii
 
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
 
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
 
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 Photoshop CC 2025 Crack Full Serial Key With Latest
Adobe Photoshop CC 2025 Crack Full Serial Key  With LatestAdobe Photoshop CC 2025 Crack Full Serial Key  With Latest
Adobe Photoshop CC 2025 Crack Full Serial Key With Latest
usmanhidray
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
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
 
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage DashboardsAdobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
BradBedford3
 
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
 
Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025
kashifyounis067
 
Solidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license codeSolidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license code
aneelaramzan63
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
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
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Ranjan Baisak
 
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
 
Minitab 22 Full Crack Plus Product Key Free Download [Latest] 2025
Minitab 22 Full Crack Plus Product Key Free Download [Latest] 2025Minitab 22 Full Crack Plus Product Key Free Download [Latest] 2025
Minitab 22 Full Crack Plus Product Key Free Download [Latest] 2025
wareshashahzadiii
 
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
 
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
 
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 Photoshop CC 2025 Crack Full Serial Key With Latest
Adobe Photoshop CC 2025 Crack Full Serial Key  With LatestAdobe Photoshop CC 2025 Crack Full Serial Key  With Latest
Adobe Photoshop CC 2025 Crack Full Serial Key With Latest
usmanhidray
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
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
 
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage DashboardsAdobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
BradBedford3
 
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
 
Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025
kashifyounis067
 
Solidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license codeSolidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license code
aneelaramzan63
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
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
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
Ad

Introducing Git and git flow

  • 1. Introducing : git + gitflow Sebin Benjamin, Software Engineer Lulu International Exchange
  • 2. What is git ? Git is an open source, distributed version control system designed for speed and efficiency. ● Every developer “clones” a copy of a repository and has the full history of the project on their own hard drive. This copy (or “clone”) has all of the metadata of the original. ● Enables you to track changes, when they happened, and who made them. ● Revert to different versions if needed ● Develop in parallel using branches ● Easier to collaborate with other developers
  • 3. What is git ? ● Git creates a .git folder (in the current folder) to store the details of the file system - this folder contains all the data required to track your files and is known as a repository, or repo. ● Git has got branches which allow you to work on a copy of the code without destroying the original.
  • 9. ● Working tree ● Staging area ● Git directory Sections of a Git project
  • 11. Commits, the basic building blocks ● Code is wrapped into commits ● One thing added per commit ● Commits should have useful names ● git log lists the commits made in that repository in reverse chronological order ● lists each commit with its (40 char) SHA-1 checksum, the author’s name and email, the date written, and the commit message
  • 12. $ git log commit ca82a6dff817ec66f44342007202690a93763949 Author: Scott Chacon <[email protected]> Date: Mon Mar 17 21:52:11 2008 -0700 changed the version number commit 085bb3bcb608e1e8451d4b2432f8ecbe6306e7e7 Author: Scott Chacon <[email protected]> Date: Sat Mar 15 16:40:33 2008 -0700 removed unnecessary test commit a11bef06a3f659402fe7563abf99ad00de2209e6 Author: Scott Chacon <[email protected]> Date: Sat Mar 15 10:31:28 2008 -0700 first commit
  • 14. Commit messages Should be detailed and be descriptive and follow a format. ● Write commit messages as a sentence ● Make sure one commit does just one thing ● Capitalize sentences. Use either: ● Present tense of the commit does ● A description of what the changes in the code does ● Example : fix off by one error in the Bar loop
  • 15. Tags ● Tags are pointers to a commit of particular significance. Some examples of these are for marking versions of your product or important changes. ● Right click on the commit you'd like to tag, and select create tag here at the bottom. ● Tags are similar to branches, but tags are static pointers to a particular commit, whereas when you add a new commit to a branch, the head of the branch moves to point to the new commit. ● If you would want to make the tag available on a remote, just right click the tag and select to push the tag to the remote.
  • 16. Branches ● Branching means you diverge from the main line of development and continue to do work without messing with that main line ● Git branches is incredibly lightweight, making branching operations nearly instantaneous, and switching back and forth between branches generally just as fast Merging ● Merging takes the commits on two different branches and combines them. ● Files are automatically merged, unless their are two conflicting set of changes (merge conflicts) , i.e. commits on the different branches updating the same line in different ways. https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell
  • 18. .gitignore ● From time to time, there are files/folders you don't want Git to check in to git repository. ● A .gitignore file should be committed into your repository to share the ignore rules with any other users that clone the repository. ● Example: sebin@home:~$ cat .gitignore # Build Files # bin target build/ .gradle https://github.com/github/gitignore https://git-scm.com/docs/gitignore
  • 19. Command line instructions - cloning Git global setup git config --global user.name "Jenkins" git config --global user.email "[email protected]" Cloning a new repository git clone http://[email protected]:8025/utility-apps/remind-me.git cd remind-me touch README.md git add README.md git commit -m "add README" git push -u origin master
  • 20. Adding existing folder to new repository cd existing_folder git init git remote add origin http://[email protected]:8025/utility-apps/remind-me.git git add . git commit git push -u origin master Pushing an existing Git repository cd existing_repo git remote add origin http://[email protected]:8025/utility-apps/remind-me.git git push -u origin --all git push -u origin --tags
  • 21. git clients Users can manage Git primarily from the command line, however, there are several graphical user interface (GUI) Git clients that facilitate efficient and reliable usage of Git on a desktop and offer most, if not all of the command line operations. - Gitkraken - Source Tree
  • 22. gitflow - a branching model for Git... GitFlow is a list of rules to keep a repo’s history organized, and is used to make the release process, bug fixes, and feature creation easier.
  • 24. The main branches ● master ○ origin/master to be the main branch where the source code of HEAD always reflects a production-ready state ● develop ○ origin/develop to be the main branch where the source code of HEAD always reflects a state with the latest delivered development changes for the next release. Some would call this the “integration branch”.
  • 26. Supporting branches A variety of supporting branches aid parallel development between team members, ease tracking of features, prepare for production releases and to assist in quickly fixing live production problems. These branches always have a limited lifetime, since they will be removed eventually. Branches are not “special” from a technical perspective. The branch types are categorized by how we use them. They are of course plain old Git branches. The different types of branches we may use are: ● Feature branches ● Release branches ● Hotfix branches
  • 27. ● May branch off from: develop ● Must merge back into: develop ● Branch naming convention: anything except master, develop, release-*, or hotfix-* ● Feature branches (or sometimes called topic branches) are used to develop new features for the upcoming or a distant future release. Feature branches
  • 28. ● Exists as long as the feature is in development, but will eventually be merged back into develop (to definitely add the new feature to the upcoming release) or discarded (in case of a disappointing experiment). Feature branches
  • 29. Release branches ● May branch off from: develop ● Must merge back into: develop and master ● Branch naming convention: release-* ● Support preparation of a new production release. ● Allows for last-minute dotting of i’s and crossing t’s. ● Allow for minor bug fixes and preparing metadata for a release (version number, build dates, etc.).
  • 30. ● develop branch is cleared to receive features for the next big release, once the release branch is created ● At least all features that are targeted for the release-to-be-built must be merged into develop at this point in time. ● All features targeted at future releases may not—they must wait until after the release branch is branched off. ● When the state of the release branch is ready to become a real release, release branch is merged into master and develop ● Commit on master must be tagged for easy future reference to this historical version
  • 31. Hotfix branches ● May branch off from: master ● Must merge back into: develop and master ● Branch naming convention: hotfix-* Hotfix branches are very much like release branches in that they are also meant to prepare for a new production release, albeit unplanned.
  • 32. Hotfix branches ● When a critical bug in a production version must be resolved immediately, a hotfix branch may be branched off from the corresponding tag on the master branch that marks the production version. ● Team members (on the develop branch) can continue, while another person is preparing a quick production fix. ● Exception to the rule here is that, when a release branch currently exists, the hotfix changes need to be merged into that release branch, instead of develop.
  • 33. Git client support ● Gitkraken - https://support.gitkraken.com/repositories/git-flow ● Added benefit of adding all features, hotfixes, and release branches in different folders. ● Prefix for the GitFlow branch type will allow gui to recognize it as being a GitFlow branch, i.e. feature/branch-name. Any branches that do not have the prefix, will be displayed in the local repository section, but not in the GitFlow menu.
  • 35. If you do not currently have these branches in your local repository, GitKraken will create them when GitFlow is initialized.
  • 37. Color Conventions - Gitkraken Red - File deleted Green - File added (new file) Orange - File modified
  • 38. Branch naming conventions ● Use dashes (-) to separate parts of your branch names ● Do not use bare numbers as leading parts. Eg: 5450124-bug-remit ● Avoid long descriptive names. Eg: avoid remit-temporary-fix-for-live-important ● Avoid use of capital letters ● Identifiers from corresponding tickets in an external service (eg. a GitHub issue) are also good candidates for use in branch names. Eg : bug ID’s in yodiz or other issue reporting tools https://github.com/agis/git-style-guide
  • 39. References ● “How GitHub will save the World Economy” - Scott Chacon https://github.com/schacon/git-presentations/tree/master/git_world_economy_talk ● An Introduction to Collaborating with Version Control https://learn.adafruit.com/an-introduction-to-collaborating-with-version-control/overview ● Git book https://git-scm.com/book/en/v2/ ● Ignoring files - Github help https://help.github.com/articles/ignoring-files/ ● A successful Git branching model http://nvie.com/posts/a-successful-git-branching-model/ ● GitFlow in Gitkraken https://support.gitkraken.com/repositories/git-flow