Giter Site home page Giter Site logo

how-to-git's Introduction

how-to-git

A repoo with some branches and some pull requests designed to show how to:

  • Make good commits
    • Not too much sausage (squash commits)
    • Not too little sausage (splitt commits)
  • Make good Pull Requests
  • Review Pull Requests like a boss
  • Use the Fetch & Rebase method of working (rather than pull)

Designed to be used in conjunction with my How to git slides.

Notes

Obviously some of this is very opinionated. I am working to the following principles when making this guide:

Good commit messages

This post by Chris Beams delves deep into what makes a good commit message and why.

Good commits

We don't need to see how the sausage is made. A good commit should be the code needed for a single logical change. Nothing more, nothing less.

Making pull requests

Much like the Good commits section above good Pull Requests make everyone's lives easier.

Handy git settings

These are setting which improve over the base setup

Always fast forward merge

As discussed in the slides, merge commits are ugly but that doesn't mean we can't still use the merge functionality of git.

By default merge will try and fast-forward commits without creating a merge commit if possible but will create a merge commit if needed.

With this setting it means it'll throw an error rather create the merge commit which give you the chance to fix the thing causing the merge commit before it happens, keeping you log nice and clean.

$ git config --global merge.ff only

how-to-git's People

Contributors

ryanwalder 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.