SlideShare a Scribd company logo
Git – Fast Version Control System 09.2011
Git is a distributed revision control, initially designed by Linus Torvalds. The system has an emphasis on: - Decentralized - Speed - Non linear development - Easy use of branching and merging Introducing Git
Why is Git better then ... Everything is local
Why is Git better then ... Git has a Staging Area
Why is Git better then ... Cheap local  branching
Back to Subversion and the Babysitter problem With Subversion ...  1. you can't do anything without access to the Server 2. experimental changes are hard to handle, because everyone see's what you commit.  Solution : don't commit your changes (remember Rails3 upgrade?) :o)
Git and the decentralized model Every time you checkout a repository, you have a full copy of the Repository on your local machine. This means even if you work offline or the server explodes, you can ...  - write a commit or revert files - create branches and merge them into master And if you (or the server) are back online, you can push the changes back to the remote server.
The Staging Area The Staging area is like a loading ramp for your next commit. With  git add ./filename  you can add the current state of the file to the Staging Area.  Hint:  Of course you can add a several number of files. If one file in the Staging Area changes later, it will not affect your state in the Staging Area – you'll need to add it again. After all your changes are finished, you can commit the files from the staging area with  git commit -m 'your message'
The Staging Area $ git status Changed but not updated: modified:  test.html $ git add . $ git status Changes to be committed: modified:  test.html ... [now we'll change test.html again] ... $ git status Changes to be committed: modified:  test.html Changes not staged: modified:  test.html
Stashing Remember when you start working hours on a new feature and getting interrupted by a important bug-fix? With Stashing, you can put the current changes into the background and revert your working version back to the last commit. After you committed the bug-fix, you can pull your changes back from stash. Hint:  you can use multiple levels of stashes.
Stashing $ git status Changes to be committed: modified:  test.html $ git stash HEAD is now at 5ac8faf ... $ git status nothing to commit (working directory clean) $ git stash apply $ git status Changes to be committed: modified:  test.html
Branching and Merging Branches are really lightweight and you can easy handle multiple branches in your repository (remember that everything is local!) It's also a good convenience to create a new branch for every feature or Bug-fix and merge them back into a release Branch.  Never commit changes directly to the master Branch.
A successful branching model
A successful branching model Two main branches: develop and master The master branch should always reflect the production ready state. The develop branch reflects the state with the latest delivered changes for the next release. When the source code in the develop branch reaches a stable point and is ready to be released, all of the changes must be merged to master
A successful branching model - Features When working on a new feature, we'll start off with creating a new branch from the develop branch. git checkout -b my_new_feature develop If the feature is finished and ready to release, we'll merge them back to the develop branch and push it to remote. git checkout develop git merge  my_new_feature git push origin develop
A successful branching model - Hotfixes When a critical bug in a production version must be resolved, a hot-fix branch may be branched off from master that marks the production version. git checkout -b hotfix-1.2.1 master The bug-fix needs then to be merged back into master & develop branch git checkout master git merge hotfix-1.2.1 (do the same for the develope branch)
Git improvements Git-Flow – easy working with the branching model http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/ Gerrit – A Code Review Tool for Git http://code.google.com/p/gerrit/ Netbeans Git Module http://nbgit.org/
Contact checkitmobile GmbH Gerrit Wanderer Ruby on Rails-Developer Waldemarstr. 37a 10999 Berlin Tel:  +49 30 921 228 61 Mail:  [email_address]

More Related Content

What's hot

Git
GitGit
Git rebase
Git rebaseGit rebase
Git rebase
SitaPrajapati
 
Stream1 change sets delivery to stream2 in RTC
Stream1 change sets delivery to stream2 in RTCStream1 change sets delivery to stream2 in RTC
Stream1 change sets delivery to stream2 in RTC
Ankit Vashistha
 
Git for the absolute beginners
Git for the absolute beginnersGit for the absolute beginners
Git for the absolute beginners
Gabriele Baldassarre
 
Basic principles of Git
Basic principles of GitBasic principles of Git
Basic principles of Git
phuongvohuy
 
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 2 - fetch the latest state
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 2 - fetch the latest stateGit Tutorial EclipseCon France 2014 - Gerrit Exercise 2 - fetch the latest state
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 2 - fetch the latest state
msohn
 
Git cheat sheet_dark
Git cheat sheet_darkGit cheat sheet_dark
Git cheat sheet_darkKing Hom
 
Git cheat sheet__white
Git cheat sheet__whiteGit cheat sheet__white
Git cheat sheet__whiteKing Hom
 
Git learning
Git learningGit learning
Git learning
Amit Gupta
 
Honestly Git Playground 20190221
Honestly Git Playground 20190221Honestly Git Playground 20190221
Honestly Git Playground 20190221
Shinho Kang
 
Subversion to Git Migration
Subversion to Git MigrationSubversion to Git Migration
Subversion to Git Migration
Manish Chakravarty
 
Cheltenham Geeks - git talk/interactive session
Cheltenham Geeks - git talk/interactive sessionCheltenham Geeks - git talk/interactive session
Cheltenham Geeks - git talk/interactive session
Matt Breckon
 
Getting started with k8
Getting started with k8Getting started with k8
Getting started with k8
Anirban Sen Chowdhary
 
Things I Heart
Things I HeartThings I Heart
Things I Heart
Glen Barnes
 
01 - Git vs SVN
01 - Git vs SVN01 - Git vs SVN
01 - Git vs SVN
Edward Goikhman
 
Git commands
Git commandsGit commands
Git commands
Viyaan Jhiingade
 
Git rewriting git history
Git   rewriting git  historyGit   rewriting git  history
Git rewriting git historyLearningTech
 
Configure Golden Gate Initial Load and Change Sync
Configure Golden Gate Initial Load and Change SyncConfigure Golden Gate Initial Load and Change Sync
Configure Golden Gate Initial Load and Change Sync
Arun Sharma
 

What's hot (19)

Git
GitGit
Git
 
Git rebase
Git rebaseGit rebase
Git rebase
 
Stream1 change sets delivery to stream2 in RTC
Stream1 change sets delivery to stream2 in RTCStream1 change sets delivery to stream2 in RTC
Stream1 change sets delivery to stream2 in RTC
 
Git for the absolute beginners
Git for the absolute beginnersGit for the absolute beginners
Git for the absolute beginners
 
Basic principles of Git
Basic principles of GitBasic principles of Git
Basic principles of Git
 
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 2 - fetch the latest state
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 2 - fetch the latest stateGit Tutorial EclipseCon France 2014 - Gerrit Exercise 2 - fetch the latest state
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 2 - fetch the latest state
 
Git cheat sheet
Git cheat sheetGit cheat sheet
Git cheat sheet
 
Git cheat sheet_dark
Git cheat sheet_darkGit cheat sheet_dark
Git cheat sheet_dark
 
Git cheat sheet__white
Git cheat sheet__whiteGit cheat sheet__white
Git cheat sheet__white
 
Git learning
Git learningGit learning
Git learning
 
Honestly Git Playground 20190221
Honestly Git Playground 20190221Honestly Git Playground 20190221
Honestly Git Playground 20190221
 
Subversion to Git Migration
Subversion to Git MigrationSubversion to Git Migration
Subversion to Git Migration
 
Cheltenham Geeks - git talk/interactive session
Cheltenham Geeks - git talk/interactive sessionCheltenham Geeks - git talk/interactive session
Cheltenham Geeks - git talk/interactive session
 
Getting started with k8
Getting started with k8Getting started with k8
Getting started with k8
 
Things I Heart
Things I HeartThings I Heart
Things I Heart
 
01 - Git vs SVN
01 - Git vs SVN01 - Git vs SVN
01 - Git vs SVN
 
Git commands
Git commandsGit commands
Git commands
 
Git rewriting git history
Git   rewriting git  historyGit   rewriting git  history
Git rewriting git history
 
Configure Golden Gate Initial Load and Change Sync
Configure Golden Gate Initial Load and Change SyncConfigure Golden Gate Initial Load and Change Sync
Configure Golden Gate Initial Load and Change Sync
 

Similar to Checkitmobile - using Git for development

Checkitmobile advanced git
Checkitmobile advanced gitCheckitmobile advanced git
Checkitmobile advanced gitGerrit Wanderer
 
Git development workflow
Git development workflowGit development workflow
Git development workflow
Sankar Suda
 
Git
GitGit
Git usage (Basics and workflow)
Git usage (Basics and workflow)Git usage (Basics and workflow)
Git usage (Basics and workflow)
Yeasin Abedin
 
Git and git flow
Git and git flowGit and git flow
Git and git flow
Fran García
 
Introducing Git and git flow
Introducing Git and git flow Introducing Git and git flow
Introducing Git and git flow
Sebin Benjamin
 
Gitflow - Branching and Merging Flow for Git
Gitflow - Branching and Merging Flow for GitGitflow - Branching and Merging Flow for Git
Gitflow - Branching and Merging Flow for Git
Maulik Shah
 
Gitflow - Branching and Merging Flow for Git
Gitflow - Branching and Merging Flow for GitGitflow - Branching and Merging Flow for Git
Gitflow - Branching and Merging Flow for Git
Maulik Shah
 
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 in a nutshell
GIT in a nutshellGIT in a nutshell
GIT in a nutshell
alignan
 
A successful Git branching model
A successful Git branching model A successful Git branching model
A successful Git branching model abodeltae
 
Git flow Introduction
Git flow IntroductionGit flow Introduction
Git flow Introduction
David Paluy
 
Developing with versioning and CI/CD
Developing with versioning and CI/CDDeveloping with versioning and CI/CD
Developing with versioning and CI/CD
Matteo Di Carlo
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
Ananth Kumar
 
Git github
Git githubGit github
Git github
Anurag Deb
 
Git cheat sheet__grey
Git cheat sheet__greyGit cheat sheet__grey
Git cheat sheet__greyKing Hom
 
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
 
Managing releases effectively through git
Managing releases effectively through gitManaging releases effectively through git
Managing releases effectively through git
Mohd Farid
 
A Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching StrategyA Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching Strategy
Vivek Parihar
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
mobaires
 

Similar to Checkitmobile - using Git for development (20)

Checkitmobile advanced git
Checkitmobile advanced gitCheckitmobile advanced git
Checkitmobile advanced git
 
Git development workflow
Git development workflowGit development workflow
Git development workflow
 
Git
GitGit
Git
 
Git usage (Basics and workflow)
Git usage (Basics and workflow)Git usage (Basics and workflow)
Git usage (Basics and workflow)
 
Git and git flow
Git and git flowGit and git flow
Git and git flow
 
Introducing Git and git flow
Introducing Git and git flow Introducing Git and git flow
Introducing Git and git flow
 
Gitflow - Branching and Merging Flow for Git
Gitflow - Branching and Merging Flow for GitGitflow - Branching and Merging Flow for Git
Gitflow - Branching and Merging Flow for Git
 
Gitflow - Branching and Merging Flow for Git
Gitflow - Branching and Merging Flow for GitGitflow - Branching and Merging Flow for Git
Gitflow - Branching and Merging Flow for Git
 
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
 
GIT in a nutshell
GIT in a nutshellGIT in a nutshell
GIT in a nutshell
 
A successful Git branching model
A successful Git branching model A successful Git branching model
A successful Git branching model
 
Git flow Introduction
Git flow IntroductionGit flow Introduction
Git flow Introduction
 
Developing with versioning and CI/CD
Developing with versioning and CI/CDDeveloping with versioning and CI/CD
Developing with versioning and CI/CD
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
 
Git github
Git githubGit github
Git github
 
Git cheat sheet__grey
Git cheat sheet__greyGit cheat sheet__grey
Git cheat sheet__grey
 
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
 
Managing releases effectively through git
Managing releases effectively through gitManaging releases effectively through git
Managing releases effectively through git
 
A Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching StrategyA Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching Strategy
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
 

Recently uploaded

Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 

Recently uploaded (20)

Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 

Checkitmobile - using Git for development

  • 1. Git – Fast Version Control System 09.2011
  • 2. Git is a distributed revision control, initially designed by Linus Torvalds. The system has an emphasis on: - Decentralized - Speed - Non linear development - Easy use of branching and merging Introducing Git
  • 3. Why is Git better then ... Everything is local
  • 4. Why is Git better then ... Git has a Staging Area
  • 5. Why is Git better then ... Cheap local branching
  • 6. Back to Subversion and the Babysitter problem With Subversion ... 1. you can't do anything without access to the Server 2. experimental changes are hard to handle, because everyone see's what you commit. Solution : don't commit your changes (remember Rails3 upgrade?) :o)
  • 7. Git and the decentralized model Every time you checkout a repository, you have a full copy of the Repository on your local machine. This means even if you work offline or the server explodes, you can ... - write a commit or revert files - create branches and merge them into master And if you (or the server) are back online, you can push the changes back to the remote server.
  • 8. The Staging Area The Staging area is like a loading ramp for your next commit. With git add ./filename you can add the current state of the file to the Staging Area. Hint: Of course you can add a several number of files. If one file in the Staging Area changes later, it will not affect your state in the Staging Area – you'll need to add it again. After all your changes are finished, you can commit the files from the staging area with git commit -m 'your message'
  • 9. The Staging Area $ git status Changed but not updated: modified: test.html $ git add . $ git status Changes to be committed: modified: test.html ... [now we'll change test.html again] ... $ git status Changes to be committed: modified: test.html Changes not staged: modified: test.html
  • 10. Stashing Remember when you start working hours on a new feature and getting interrupted by a important bug-fix? With Stashing, you can put the current changes into the background and revert your working version back to the last commit. After you committed the bug-fix, you can pull your changes back from stash. Hint: you can use multiple levels of stashes.
  • 11. Stashing $ git status Changes to be committed: modified: test.html $ git stash HEAD is now at 5ac8faf ... $ git status nothing to commit (working directory clean) $ git stash apply $ git status Changes to be committed: modified: test.html
  • 12. Branching and Merging Branches are really lightweight and you can easy handle multiple branches in your repository (remember that everything is local!) It's also a good convenience to create a new branch for every feature or Bug-fix and merge them back into a release Branch. Never commit changes directly to the master Branch.
  • 14. A successful branching model Two main branches: develop and master The master branch should always reflect the production ready state. The develop branch reflects the state with the latest delivered changes for the next release. When the source code in the develop branch reaches a stable point and is ready to be released, all of the changes must be merged to master
  • 15. A successful branching model - Features When working on a new feature, we'll start off with creating a new branch from the develop branch. git checkout -b my_new_feature develop If the feature is finished and ready to release, we'll merge them back to the develop branch and push it to remote. git checkout develop git merge my_new_feature git push origin develop
  • 16. A successful branching model - Hotfixes When a critical bug in a production version must be resolved, a hot-fix branch may be branched off from master that marks the production version. git checkout -b hotfix-1.2.1 master The bug-fix needs then to be merged back into master & develop branch git checkout master git merge hotfix-1.2.1 (do the same for the develope branch)
  • 17. Git improvements Git-Flow – easy working with the branching model http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/ Gerrit – A Code Review Tool for Git http://code.google.com/p/gerrit/ Netbeans Git Module http://nbgit.org/
  • 18. Contact checkitmobile GmbH Gerrit Wanderer Ruby on Rails-Developer Waldemarstr. 37a 10999 Berlin Tel: +49 30 921 228 61 Mail: [email_address]