Giter Site home page Giter Site logo

git-pr-merge-options's Introduction

Github Merge Options

Goal

The goal of this repository is to provide examples of using Github PR merging options (Merge, Squash and Merge and Rebase and Merge) and show how they affect the master branch history.

More information can be found here: Merge methods on GitHub

Branches

All branches will be merged into master using the option defined by their names:

  • rebase-branch
  • squash-branch
  • merge-branch

Rebase and Merge

All commits from rebase-branch are added to master In this example we have the following commits:

  • rebase: adding README.md file
  • rebase: add information to README.md
  • rebase: fix typo
  • rebase: add rebase branch merging info

Rebase PR

Master Result

Squash and Merge

All commits from squash-branch turn into a single commit that is added to master When merging, Github allows you to update the commit message to explain the purpose of the PR. In this example we have the following commits:

  • squash: add some images about rebase and merge option
  • squash: update image to focus on Github option for rebase
  • squash: add squash information and .gitignore

Squash PR

Squash Commit Form

Squash Result

Merge (Create a merge commit)

This is the default method. All commits from merge-branch are added to master and it also generates a merge commit. In this example we have the following commits:

  • merge: add borders to images
  • merge: adds information about Github merge option
  • merge: clean up README

Merge PR

Merge Result

Author

Douglas Nomizo

git-pr-merge-options's People

Contributors

douglasnomizo avatar

Stargazers

 avatar

Watchers

 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.