Git/squash

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< Git
Revision as of 15:20, 12 November 2018 by Woozle (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Notes

Squashing seems to involve something like this (not yet tested):

# Create new branch from master and switch to it
$ git checkout -b <squash-branch>

# squash the commits from feature into your squash branch
$ git read-tree -m -u <source-branch>
# commit and push to origin
$ git commit
$ git push origin <squash-branch> --set-upstream

Where:

  • <squash-branch> is the temporary branch into which you are doing the squashing
  • <source-branch> is the name of the branch you're squashing [from].