Skip to content

Commit

Permalink
Improve done recipe (#444)
Browse files Browse the repository at this point in the history
The old version often failed due to rebase conflicts if the feature branch to delete had multiple commits and was squash-merged into master.

This version just checks that the up-to-date master branch matches the feature branch and uses -D to delete the feature branch. This guarantees that we don't lose any work, and avoids bad rebases from squash merges to master.
casey authored May 15, 2019
1 parent 9b08ce6 commit d9986a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
@@ -51,11 +51,11 @@ publish: publish-check

# clean up feature branch BRANCH
done BRANCH:
git checkout {{BRANCH}}
git pull --rebase github master
git checkout master
git diff --no-ext-diff --quiet --exit-code
git pull --rebase github master
git branch -d {{BRANCH}}
git diff --no-ext-diff --quiet --exit-code {{BRANCH}}
git branch -D {{BRANCH}}

# install just from crates.io
install:

0 comments on commit d9986a3

Please sign in to comment.