From e0663f25d1db6c5821d411289833bf495c78b052 Mon Sep 17 00:00:00 2001 From: brendandahl Date: Wed, 3 Oct 2012 17:24:11 -0700 Subject: [PATCH] Created Squashing Commits (markdown) --- Squashing-Commits.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Squashing-Commits.md diff --git a/Squashing-Commits.md b/Squashing-Commits.md new file mode 100644 index 0000000..043b6e3 --- /dev/null +++ b/Squashing-Commits.md @@ -0,0 +1,19 @@ +We try to keep the history for pdf.js relatively clean and we may ask contributors to "squash" their commits before we merge. + +**Note:** +These directions assume that you named the Mozilla pdf.js repo (not your fork) `upstream` and you have a branch called `super-feature`. + +1. Add the following to your git config. Either the global one or the config within your pdf.js fork (`.git/config`). +```bash +[alias] + squash = !sh -c 'git checkout upstream/master && git merge --no-commit --squash $0 && git checkout -B $0 && git commit -e' +``` +1. Then you simply need to do: +```bash +git squash super-feature +``` +1. That will bring up your editor allow you to put in the commit message you want. +1. Then update the pull request: +```bash +git push --force origin super-feature +``` \ No newline at end of file