Commit f95eef15 authored by Committed by Junio C Hamano
filter-branch: introduce convenience function "skip_commit"
With this function, a commit filter can leave out unwanted commits (such as temporary commits). It does _not_ undo the changeset corresponding to that commit, but it _skips_ the revision. IOW no tree object is changed by this. If you like to commit early and often, but want to filter out all intermediate commits, marked by "@@@" in the commit message, you can now do this with git filter-branch --commit-filter ' if git cat-file commit $GIT_COMMIT | grep '@@@' > /dev/null; then skip_commit "$@"; else git commit-tree "$@"; fi' newbranch Signed-off-by: Johannes Schindelin <email@example.com> Signed-off-by: Junio C Hamano <firstname.lastname@example.org>
Showing with 42 additions and 14 deletions