Skip to main content

We have three branches:

  • master
  • staging
  • dev

We branch per issue and each issue needs to go through testing and staging before being merged to master.

We branch feature branches from master and work on that feature.

  • When ready for testing, we merge the feature branch into dev branch and TeamCity deploys to test environment.
  • When ready for staging, we merge the feature branch into staging branch and TeamCity deploys to staging environment.

This involves a lot of merge commits on dev/staging branches, but very few on master, because the feature branches are always branched from master.

It's always a merge commit merged with a feature branch, so this is a merge from a merge, from a merge, from a merge, etc... So eachat any time TeamCity has 100+ pending changes, even though there is only 1 changed file when doing:

git diff dev~1...dev

Is there some way to minimize these merge commits? Are
Are we doing Git wrong?

We have three branches:

  • master
  • staging
  • dev

We branch per issue and each issue needs to go through testing and staging before being merged to master.

We branch feature branches from master and work on that feature.

  • When ready for testing, we merge the feature branch into dev branch and TeamCity deploys to test environment.
  • When ready for staging, we merge the feature branch into staging branch and TeamCity deploys to staging environment.

This involves a lot of merge commits on dev/staging branches, but very few on master, because the feature branches are always branched from master.

It's always a merge commit merged with a feature branch, so this is a merge from a merge, from a merge, from a merge, etc... So each time TeamCity has 100+ pending changes, even though there is only 1 changed file when doing:

git diff dev~1...dev

Is there some way to minimize these merge commits? Are we doing Git wrong?

We have three branches:

  • master
  • staging
  • dev

We branch per issue and each issue needs to go through testing and staging before being merged to master.

We branch feature branches from master and work on that feature.

  • When ready for testing, we merge the feature branch into dev branch and TeamCity deploys to test environment.
  • When ready for staging, we merge the feature branch into staging branch and TeamCity deploys to staging environment.

This involves a lot of merge commits on dev/staging branches, but very few on master, because the feature branches are always branched from master.

It's always a merge commit merged with a feature branch, so this is a merge from a merge, from a merge, from a merge, etc... So at any time TeamCity has 100+ pending changes, even though there is only 1 changed file when doing:

git diff dev~1...dev

Is there some way to minimize these merge commits?
Are we doing Git wrong?

Source Link
Gaui
  • 164
  • 7

Git and merge commits

We have three branches:

  • master
  • staging
  • dev

We branch per issue and each issue needs to go through testing and staging before being merged to master.

We branch feature branches from master and work on that feature.

  • When ready for testing, we merge the feature branch into dev branch and TeamCity deploys to test environment.
  • When ready for staging, we merge the feature branch into staging branch and TeamCity deploys to staging environment.

This involves a lot of merge commits on dev/staging branches, but very few on master, because the feature branches are always branched from master.

It's always a merge commit merged with a feature branch, so this is a merge from a merge, from a merge, from a merge, etc... So each time TeamCity has 100+ pending changes, even though there is only 1 changed file when doing:

git diff dev~1...dev

Is there some way to minimize these merge commits? Are we doing Git wrong?