Skip to content

Instantly share code, notes, and snippets.

@signalpillar
Created October 7, 2013 13:06
Show Gist options
  • Select an option

  • Save signalpillar/6867689 to your computer and use it in GitHub Desktop.

Select an option

Save signalpillar/6867689 to your computer and use it in GitHub Desktop.
Development with Git

Intro

The goal of this page is to suggest yet another one flow how to develop with Git. The goal of the flow itself is to make history more clearer and linear.

Flow

Given two branches develop and M42_feature_branch

We already did some development in the feature branch and even passed review. Next step is to merge changes into develop

git checkout develop git merge --squash M42_feature_branch git ci -am "meaningful message about implemented feature"

git fetch
git rebase origin/develop

# push changes
git push origin/develop

In the snippet above there are two important steps:

  • --squash used in merge. Some advantages
    • takes a series of commits and squash them down into a single commit
    • history free of messages like "Merge branch X into Y"
  • fetch/rebase instead of pull command.
    • history free of messages like "Merge branch X into Y"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment