Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Getting Your Git On

Getting Your Git On

How do you decide if you should merge or rebase? Should you squash when you do a pull request? Git can be a scary beast, but at the same time it can save you from yourself. Come and get tuned into the basics of git and get ready to master the commands that will tame the beast. We'll cover interactive rebasing, best practices when working in open source, bisecting your code to locate regressions, resetting your code and working with pull requests. We'll share in open discussion about our experiences and then tackle the tough bits. We'll also walk through a lab to really dive into the commands and gain a solid understanding of what is happening behind the scenes.

Avatar for James Chambers

James Chambers

March 22, 2016

More Decks by James Chambers

Other Decks in Programming

Transcript

  1. Repository Server Working Copy Working Copy Working Copy Centralized Source

    Control Server is the source of truth Checkout files to indicate intent Commits happen against the server Updates happen from the server
  2. Repository Repository + Working Copy Repository + Working Copy Repository

    + Working Copy Distributed Source Control Each repository is a source of truth Create remote branches to share intent Commits happen in a local graph Push and pull to remote repositories to sync
  3. Yes, let us use distributed technologies. That way we can

    trade our problems for distributed problems. - Internet advocate, Abe Lincoln
  4. Benefits and Challenges of Distribution Good Things Things to Consider

    Faster workflows Hard to enforce policy Easier experimentation Loss of visibility Lighter branching Branch “blooms” Freedom for private integrations Replication of desired integrations Free to work where needed More complicated merges Anyone can create Anyone can create
  5. Benefits of git • Cheap branches • Really good diff

    engine • Great tool chain • Extensible and customizable
  6. Tenets of Git • It’s a history of source code,

    composed of a series commits • Commits exist primarily on a branch • Branches can grow and diverge in parallel • It’s a directed, acyclic graph • It’s powerful and terrific and complicated
  7. Tenets of Git • It’s a history of source code,

    composed of a series commits • Commits exist primarily on a branch • Branches can grow and diverge in parallel • It’s a directed, acyclic graph • It’s powerful and terrific and complicated • It’s powerrificated • The basics support 90% of what we typically do • There are great tools for another 6% • For the other 4%...there is StackOverflow
  8. git bisect start git bisect bad git bisect good git

    bisect bad git bisect good git bisect bad git bisect good git bisect bad git bisect reset Or...
  9. git bisect start git bisect bad git bisect good ref

    git bisect command git bisect reset