Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider Squash or Rebase only? #17

Closed
devlinjunker opened this issue Sep 18, 2020 · 4 comments
Closed

Consider Squash or Rebase only? #17

devlinjunker opened this issue Sep 18, 2020 · 4 comments
Labels
build Improvements to the build process question Further information requested

Comments

@devlinjunker
Copy link
Owner

devlinjunker commented Sep 18, 2020

Describe the Improvement:
Just using Merge can create confusing looking network graph:
Screen Shot 2020-09-17 at 8 07 18 PM

Should we consider only allowing Squash and Merge and Rebase and Merge?

Benefits:

  • Clean network graph (no repeating dates like in image above)
  • Rebase ensures latest commits are up to date

Drawbacks:

  • Lose history of commits during development (how important is this?)
  • Squash has issues with PR diffs when you branch off squashed branch and want to merge later

How to Compare:
TBD

@devlinjunker devlinjunker added question Further information requested build Improvements to the build process labels Sep 18, 2020
@devlinjunker
Copy link
Owner Author

considering Squash only for #4 and conventional commit messages

@devlinjunker devlinjunker mentioned this issue Oct 22, 2020
5 tasks
@devlinjunker devlinjunker changed the title Consider Squash or Rebase only Consider Squash or Rebase only? Nov 15, 2020
@devlinjunker
Copy link
Owner Author

As part of auto-merge action described in #5

@devlinjunker devlinjunker mentioned this issue Nov 19, 2020
13 tasks
@devlinjunker
Copy link
Owner Author

devlinjunker commented Nov 19, 2020

Losing the history and relationship between commits seems like a big deal to me

Cons

  • Being able to create branch B off of branch A and then merge branch A without any problems in branch B merge is worthwhile.
  • Also there was the problem with squashing andthe githook large change warning being able to determine the last time a PR was made.

How often does looking at the commit history matter? Why does it need to be pretty?

@devlinjunker
Copy link
Owner Author

Seems like the best way is:

  • on merge to develop branch from feature or fix branches, always squash, this means each feature will end up being 1 commit
  • on merge to main branch from develop, use basic merge to keep history
  • on merge to develop from main after release, use basic merge to keep history

Right now, we use bulldozer (see #43) to auto-merge PRs into develop, and this always does a squash so we prefer that.

For release/hotfix PRs into main, we do these manually, so we should use the merge button in the PR for these

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Improvements to the build process question Further information requested
Projects
None yet
Development

No branches or pull requests

1 participant