Git Product home page Git Product logo

get-better-at-git's Introduction

get-better-at-git

Notes from the Free Code Camp Git for Professionals Course

The Perfect Commit

  • Create commits that 'make sense'
  • Make commits as small as possible, commiting only changes that are related
  • Do not batch all local changes into one commit!!!
  • Smaller commits are easier to understand
  • For staging partials use git add -p <filename>
  • Commit messages
    • Subject should be concise
    • Body should be more verbose and detailed
    • Commit message body should answer
      • What is different than before?
      • What is the reason for the change?
      • Is there anything that others should watch out for in this commit?

Branching Strategies

  • Well documented conventions are critical regardless of the strategy
  • Most projects use the Github Flow model with one long running branch, integrating short running feature/bug fix branches

Merge Conflicts

  • You can always abort a merge/rebase with git merge --abort || git rebase --abort
  • Merge conflicts can be resolved by simply cleaning up the file

Merge vs. Rebase

  • Merge

    • Simply integrates commits from one branch into another
    • The structure of the branches and their commits is preserved in the git history
  • Rebase

    • Temporarily parks the commits of one branch, then integrates the commits from the new branch, then finally it "rebases" the parked commits on top of everything

get-better-at-git's People

Contributors

stordahl avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.