Understanding Branching and Merging in Git
Upcoming SlideShare
Loading in...5
×
 

Understanding Branching and Merging in Git

on

  • 2,773 vues

Branches are a core tool in Git. Learn to understand the basic concepts - and use all of their advantages in your projects.

Branches are a core tool in Git. Learn to understand the basic concepts - and use all of their advantages in your projects.

Statistiques

Vues

Total des vues
2,773
Vues sur SlideShare
2,710
Vues externes
63

Actions

J'aime
3
Téléchargements
12
Commentaires
0

2 Ajouts 63

https://twitter.com 62
https://www.linkedin.com 1

Accessibilité

Détails de l'import

Uploaded via as Adobe PDF

Droits d'utilisation

© Tous droits réservés

Report content

Signalé comme inapproprié Signaler comme inapproprié
Signaler comme inapproprié

Indiquez la raison pour laquelle vous avez signalé cette présentation comme n'étant pas appropriée.

Annuler
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Votre message apparaîtra ici
    Processing...
Poster un commentaire
Modifier votre commentaire

Understanding Branching and Merging in Git Understanding Branching and Merging in Git Presentation Transcript

  • Learn Version Control with Git Understanding Branching 
 & Merging in Git
  • The World Without Branches Login Feature New Design #1 Bugfix #213 C1 C3 C7C5C2 C6C4 CHAOS What happens if your client doesn’t like “New Design #1”? How do you get (only) that code out? If “Login Feature” introduces a bug, all of your code contains this bug! What if you need to release “Login Feature”? It already contains “New Design #1” - which you maybe don’t want to release…
  • Branches to the Rescue C1 C5 Login Feature New Design #1 Bugfix #213 C4 C3 C7 C2 C6 each topic gets its own context, completely separated from any other context - If something goes wrong, only this context has the problem! - Creating and deleting contexts is quick & easy!
  • Pointers and the HEAD C1 C2 C3 contact-form HEAD master branches are just pointers on commits (no magic…) at any time point in time, only one branch can be active = checked out = HEAD in Git, you are always working on a branch!
  • Switching the Active Branch the “checkout” command moves the HEAD pointer to a different branch - 
 and thereby makes that branch active $ git checkout master C1 C2 C3 contact-form master HEAD
  • Switching the Active Branch to switch the active branch simply double-click it in a desktop app like Tower all local branches are listed in the sidebar
  • Merging Branches $ git merge contact-form merging integrates all the commits (the ones you don’t have, yet) from the specified branch into your current HEAD C1 C2 contact-form master HEAD C3 C4 merge commit C5
  • Learn Git with our free online book on www.git-tower.com/learn