SlideShare a Scribd company logo
1 of 15
[object Object],02.2012
What've learned so far from Git  - Using Git as decentralized VersionControlSystem - Working with Git on Console or Netbeans (more or less) - Working with a Master and a Release branch (explained later) Advantages: - Less complexity on releases - Faster Hotfix-Process with a clear history (no email required) Disadvantages: - More to type / more complex commit process
Branching Why branching is useful: We can develop features and play with experimental stuff in our own sandbox, and avoid that other team members having trouble with our codechanges. Local and remote branches: A branch is created on your local machine. While pushing your changes to remote, a new branch on remote is also being created, so that all team members can pull the branch and start working together on this branch.
Branching examples Create a new local branch $ git branch new_branch .. or with checking out directly: $ git checkout -b branch_name .. or branching a specific version $ git branch specific_branch 99a0de8 Create a remote branch from current $ git push origin branch_name List all local and remote branches $ git branch -a  (local and remote) $ git branch -r  (ony remote) Delete a local Branch $ git branch -D branch_name Delete a remote Branch $ git push origin :branch_name
Merging When it's time to merge branches? 1. If you've finished your work on a branch and want to merge it back to the master branch 2. If the master branch contains important changes, that you need into your feature branch How merging works? By default,  git merge   commits the merged changes if they can be successfully merged. You can short-circuit this with the  --no-commit   option. This is useful when you want to review, and edit, the changes from the merge before making a commit.
Merging examples Merge a branch to the current branch $ git checkout master $ git merge new_branch Keep the feature Branch up2date $ git checkout new_branch $ git merge master  What happens on a conflict $ git checkout master // conflict happens $ git status // see conflicted files and fix them $ git add . $ git commit -m „merge new_branch into master “
A branching model We have now two main branches:  Master and Release The  master branch  reflects the state with the latest delivered changes for the next release. For every story (e.g. feature) we'll create a new branch for development. After the feature is finished, we can merge it back into the master branch, so that it is available for the next release. From time to time we merge the master branch into a feature branch, just to keep the status up to date. TTD: How to handle branches with pandora?
A branching model The  release branch  reflects the production ready state and it's also our base for Hotfixes. After a Hotfix is committed, they're getting deployed onto production system and merged back into master, so that they're available for the current development process.  If a hotfix was committed into the Master branch, we'll use cherry-pick to merge only this specific commit to  release . git checkout release git cherry-pick 423d021
A branching model
Git diff changes between working and staging $ git diff changes between staging and head $ git diff –staged changes between commits $ git diff 423d021..1e85ac3 changes between branches $ git diff master new_branch
Powerful Git-Tools Git-Smart-Pull  delivers us a helper for pulling updates from Remote to local. It'll check how many commits we're behind, stash uncommited changes, rebase them if we have local commits and restore the changes from stash. Git add Interactive Mode # install Git-Smart with the following command: gem install smart-git git add -p
Powerful Git-Tools Git WebInterface More Git aliases git instaweb --httpd webrick [alias] st = status ci = commit br = branch co = checkout df = diff lg = log -p
Git Log Graph There is a useful Graph-Tool to get an overview about the current commit and branching process, try the following cmd: And add it for later use to your ~/.gitconfig file $ git log --graph --date-order -C -M --pretty=format:&quot;<%h> %ad [%an] %Cgreen%d%Creset %s&quot; --all --date=short [alias] graph = log --graph --date-order -C -M --pretty=format:amp;quot;<%h> %ad [%an]%Cgreen%d%Creset %samp;quot; --all --date=short
Git Log Graph
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

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 RTCAnkit Vashistha
 
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 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 statemsohn
 
Cheltenham Geeks - git talk/interactive session
Cheltenham Geeks - git talk/interactive sessionCheltenham Geeks - git talk/interactive session
Cheltenham Geeks - git talk/interactive sessionMatt Breckon
 
Hacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHubHacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHubDSC GVP
 
Git basics to advance with diagrams
Git basics to advance with diagramsGit basics to advance with diagrams
Git basics to advance with diagramsDilum Navanjana
 
Git rewriting git history
Git   rewriting git  historyGit   rewriting git  history
Git rewriting git historyLearningTech
 
Sling Content Distribution for the Cloud - adaptTo 2019
Sling Content Distribution for the Cloud - adaptTo 2019Sling Content Distribution for the Cloud - adaptTo 2019
Sling Content Distribution for the Cloud - adaptTo 2019Timothée Maret
 
Github fundamentals to work with legendary projects
Github fundamentals to work with legendary projectsGithub fundamentals to work with legendary projects
Github fundamentals to work with legendary projectsravishankarn
 
Version control system & how to use git
Version control system & how to use git Version control system & how to use git
Version control system & how to use git Ahmed Dalatony
 
Introduction to Git for Artists
Introduction to Git for ArtistsIntroduction to Git for Artists
Introduction to Git for ArtistsDavid Newbury
 

What's hot (19)

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
 
Git cheat sheet_dark
Git cheat sheet_darkGit cheat sheet_dark
Git cheat sheet_dark
 
Git cheat sheet
Git cheat sheetGit cheat sheet
Git cheat sheet
 
Git cheat sheet__white
Git cheat sheet__whiteGit cheat sheet__white
Git cheat sheet__white
 
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
 
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
 
Hacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHubHacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHub
 
Things I Heart
Things I HeartThings I Heart
Things I Heart
 
Git basics to advance with diagrams
Git basics to advance with diagramsGit basics to advance with diagrams
Git basics to advance with diagrams
 
Git commands
Git commandsGit commands
Git commands
 
Git rewriting git history
Git   rewriting git  historyGit   rewriting git  history
Git rewriting git history
 
Sling Content Distribution for the Cloud - adaptTo 2019
Sling Content Distribution for the Cloud - adaptTo 2019Sling Content Distribution for the Cloud - adaptTo 2019
Sling Content Distribution for the Cloud - adaptTo 2019
 
Github fundamentals to work with legendary projects
Github fundamentals to work with legendary projectsGithub fundamentals to work with legendary projects
Github fundamentals to work with legendary projects
 
Git Tutorial (Part 2: Git Merge)
Git Tutorial (Part 2: Git Merge)Git Tutorial (Part 2: Git Merge)
Git Tutorial (Part 2: Git Merge)
 
Git Pull Requests
Git Pull RequestsGit Pull Requests
Git Pull Requests
 
Version control system & how to use git
Version control system & how to use git Version control system & how to use git
Version control system & how to use git
 
Introduction to Git for Artists
Introduction to Git for ArtistsIntroduction to Git for Artists
Introduction to Git for Artists
 

Viewers also liked

SCi Recruitment For Scientists
SCi   Recruitment For ScientistsSCi   Recruitment For Scientists
SCi Recruitment For Scientistscourtfoley
 
New data sources for statistics: Experiences at Statistics Netherlands.
New data sources for statistics: Experiences at Statistics Netherlands.New data sources for statistics: Experiences at Statistics Netherlands.
New data sources for statistics: Experiences at Statistics Netherlands.Piet J.H. Daas
 
Checkitmobile - using Git for development
Checkitmobile - using Git for developmentCheckitmobile - using Git for development
Checkitmobile - using Git for developmentGerrit Wanderer
 
Research on the Quality of Registers To Make Data Decisions in the Dutch Virt...
Research on the Quality of Registers To Make Data Decisions in the Dutch Virt...Research on the Quality of Registers To Make Data Decisions in the Dutch Virt...
Research on the Quality of Registers To Make Data Decisions in the Dutch Virt...Piet J.H. Daas
 
Twitter as a data source for official statistics: first results.
Twitter as a data source for official statistics: first results.Twitter as a data source for official statistics: first results.
Twitter as a data source for official statistics: first results.Piet J.H. Daas
 
Opportunities and methodological challenges of Big Data for official statist...
Opportunities and methodological challenges of  Big Data for official statist...Opportunities and methodological challenges of  Big Data for official statist...
Opportunities and methodological challenges of Big Data for official statist...Piet J.H. Daas
 

Viewers also liked (7)

Big data Big impact?
Big data Big impact?Big data Big impact?
Big data Big impact?
 
SCi Recruitment For Scientists
SCi   Recruitment For ScientistsSCi   Recruitment For Scientists
SCi Recruitment For Scientists
 
New data sources for statistics: Experiences at Statistics Netherlands.
New data sources for statistics: Experiences at Statistics Netherlands.New data sources for statistics: Experiences at Statistics Netherlands.
New data sources for statistics: Experiences at Statistics Netherlands.
 
Checkitmobile - using Git for development
Checkitmobile - using Git for developmentCheckitmobile - using Git for development
Checkitmobile - using Git for development
 
Research on the Quality of Registers To Make Data Decisions in the Dutch Virt...
Research on the Quality of Registers To Make Data Decisions in the Dutch Virt...Research on the Quality of Registers To Make Data Decisions in the Dutch Virt...
Research on the Quality of Registers To Make Data Decisions in the Dutch Virt...
 
Twitter as a data source for official statistics: first results.
Twitter as a data source for official statistics: first results.Twitter as a data source for official statistics: first results.
Twitter as a data source for official statistics: first results.
 
Opportunities and methodological challenges of Big Data for official statist...
Opportunities and methodological challenges of  Big Data for official statist...Opportunities and methodological challenges of  Big Data for official statist...
Opportunities and methodological challenges of Big Data for official statist...
 

Similar to Checkitmobile advanced git

Git and github - Verson Control for the Modern Developer
Git and github - Verson Control for the Modern DeveloperGit and github - Verson Control for the Modern Developer
Git and github - Verson Control for the Modern DeveloperJohn Stevenson
 
Introducing Git and git flow
Introducing Git and git flow Introducing Git and git flow
Introducing Git and git flow Sebin Benjamin
 
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 ecosystemFrançois D'Agostini
 
Git development workflow
Git development workflowGit development workflow
Git development workflowSankar Suda
 
Git workflows automat-it
Git workflows automat-itGit workflows automat-it
Git workflows automat-itAutomat-IT
 
01 git interview questions &amp; answers
01   git interview questions &amp; answers01   git interview questions &amp; answers
01 git interview questions &amp; answersDeepQuest Software
 
git-commands-cheat-sheet-infopediya-com.pdf
git-commands-cheat-sheet-infopediya-com.pdfgit-commands-cheat-sheet-infopediya-com.pdf
git-commands-cheat-sheet-infopediya-com.pdfmurad khan
 
Git Branching and Merging.pptx
Git Branching and Merging.pptxGit Branching and Merging.pptx
Git Branching and Merging.pptxtapanvyas11
 
Git slides
Git slidesGit slides
Git slidesNanyak S
 
Git cheat sheet__grey
Git cheat sheet__greyGit cheat sheet__grey
Git cheat sheet__greyKing Hom
 
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 padawanJames Ford
 
Git tutorial
Git tutorialGit tutorial
Git tutorialmobaires
 
devops-complete-notes-2.pdf
devops-complete-notes-2.pdfdevops-complete-notes-2.pdf
devops-complete-notes-2.pdfRobinRohit2
 
Improving your workflow with git
Improving your workflow with gitImproving your workflow with git
Improving your workflow with gitDídac Ríos
 

Similar to Checkitmobile advanced git (20)

Git github
Git githubGit github
Git github
 
Git and github - Verson Control for the Modern Developer
Git and github - Verson Control for the Modern DeveloperGit and github - Verson Control for the Modern Developer
Git and github - Verson Control for the Modern Developer
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
 
Git
GitGit
Git
 
Introducing Git and git flow
Introducing Git and git flow Introducing Git and git flow
Introducing Git and git flow
 
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
 
Git development workflow
Git development workflowGit development workflow
Git development workflow
 
Git workflows automat-it
Git workflows automat-itGit workflows automat-it
Git workflows automat-it
 
01 git interview questions &amp; answers
01   git interview questions &amp; answers01   git interview questions &amp; answers
01 git interview questions &amp; answers
 
git-commands-cheat-sheet-infopediya-com.pdf
git-commands-cheat-sheet-infopediya-com.pdfgit-commands-cheat-sheet-infopediya-com.pdf
git-commands-cheat-sheet-infopediya-com.pdf
 
Git Branching and Merging.pptx
Git Branching and Merging.pptxGit Branching and Merging.pptx
Git Branching and Merging.pptx
 
Mastering GIT
Mastering GITMastering GIT
Mastering GIT
 
Git slides
Git slidesGit slides
Git slides
 
Git cheat sheet__grey
Git cheat sheet__greyGit cheat sheet__grey
Git cheat sheet__grey
 
Git learning
Git learningGit learning
Git learning
 
Git tips
Git tipsGit tips
Git tips
 
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 tutorial
Git tutorialGit tutorial
Git tutorial
 
devops-complete-notes-2.pdf
devops-complete-notes-2.pdfdevops-complete-notes-2.pdf
devops-complete-notes-2.pdf
 
Improving your workflow with git
Improving your workflow with gitImproving your workflow with git
Improving your workflow with git
 

Recently uploaded

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 

Recently uploaded (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 

Checkitmobile advanced git

  • 1.
  • 2. What've learned so far from Git - Using Git as decentralized VersionControlSystem - Working with Git on Console or Netbeans (more or less) - Working with a Master and a Release branch (explained later) Advantages: - Less complexity on releases - Faster Hotfix-Process with a clear history (no email required) Disadvantages: - More to type / more complex commit process
  • 3. Branching Why branching is useful: We can develop features and play with experimental stuff in our own sandbox, and avoid that other team members having trouble with our codechanges. Local and remote branches: A branch is created on your local machine. While pushing your changes to remote, a new branch on remote is also being created, so that all team members can pull the branch and start working together on this branch.
  • 4. Branching examples Create a new local branch $ git branch new_branch .. or with checking out directly: $ git checkout -b branch_name .. or branching a specific version $ git branch specific_branch 99a0de8 Create a remote branch from current $ git push origin branch_name List all local and remote branches $ git branch -a (local and remote) $ git branch -r (ony remote) Delete a local Branch $ git branch -D branch_name Delete a remote Branch $ git push origin :branch_name
  • 5. Merging When it's time to merge branches? 1. If you've finished your work on a branch and want to merge it back to the master branch 2. If the master branch contains important changes, that you need into your feature branch How merging works? By default, git merge commits the merged changes if they can be successfully merged. You can short-circuit this with the --no-commit option. This is useful when you want to review, and edit, the changes from the merge before making a commit.
  • 6. Merging examples Merge a branch to the current branch $ git checkout master $ git merge new_branch Keep the feature Branch up2date $ git checkout new_branch $ git merge master What happens on a conflict $ git checkout master // conflict happens $ git status // see conflicted files and fix them $ git add . $ git commit -m „merge new_branch into master “
  • 7. A branching model We have now two main branches: Master and Release The master branch reflects the state with the latest delivered changes for the next release. For every story (e.g. feature) we'll create a new branch for development. After the feature is finished, we can merge it back into the master branch, so that it is available for the next release. From time to time we merge the master branch into a feature branch, just to keep the status up to date. TTD: How to handle branches with pandora?
  • 8. A branching model The release branch reflects the production ready state and it's also our base for Hotfixes. After a Hotfix is committed, they're getting deployed onto production system and merged back into master, so that they're available for the current development process. If a hotfix was committed into the Master branch, we'll use cherry-pick to merge only this specific commit to release . git checkout release git cherry-pick 423d021
  • 10. Git diff changes between working and staging $ git diff changes between staging and head $ git diff –staged changes between commits $ git diff 423d021..1e85ac3 changes between branches $ git diff master new_branch
  • 11. Powerful Git-Tools Git-Smart-Pull delivers us a helper for pulling updates from Remote to local. It'll check how many commits we're behind, stash uncommited changes, rebase them if we have local commits and restore the changes from stash. Git add Interactive Mode # install Git-Smart with the following command: gem install smart-git git add -p
  • 12. Powerful Git-Tools Git WebInterface More Git aliases git instaweb --httpd webrick [alias] st = status ci = commit br = branch co = checkout df = diff lg = log -p
  • 13. Git Log Graph There is a useful Graph-Tool to get an overview about the current commit and branching process, try the following cmd: And add it for later use to your ~/.gitconfig file $ git log --graph --date-order -C -M --pretty=format:&quot;<%h> %ad [%an] %Cgreen%d%Creset %s&quot; --all --date=short [alias] graph = log --graph --date-order -C -M --pretty=format:amp;quot;<%h> %ad [%an]%Cgreen%d%Creset %samp;quot; --all --date=short
  • 15. Contact checkitmobile GmbH Gerrit Wanderer Ruby on Rails-Developer Waldemarstr. 37a 10999 Berlin Tel: +49 30 921 228 61 Mail: [email_address]