-
Couldn't load subscription status.
- Fork 97
Open
Labels
enhancementNew feature or requestNew feature or request
Description
A common challenge new contributors have is squashing commits into one:
- This requires having a local clone of the repo (especially for doc PRs, most people just use the web interface)
- Knowing how to use
git rebase, including that you should use-ito edit individual commits - Knowing that
git push -fis ok (this last step trips a lot of people up - they'll rebase and then 'merge branch into master' which defeats the whole point)
Even for existing contributors squashing is annoying because it messes up your build cache, since cargo works on mtimes and not hashes.
It would be great to have a squash command that automatically squashes all commits in the current PR into one. The way to do this locally is
git checkout https://github.com/rust-lang/rust/pull/NNNNN && git rebase -i origin/master && git push -f [email protected]:CONTRIBUTOR/rust.git HEAD:BRANCHNNNNN is the pr number, CONTRIBUTOR is the author, BRANCH is the branch name; all of these are easily available from the PR itself.
follower
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request