Repository navigation
PEFT patch releases
Benjamin Bossan edited this page Sep 28, 2026
·
1 revision
Maintainer task: Create a patch release with cherry-picked commit(s) that:
- includes a review step for the patch
- works from fork
Assumptions:
-
upstream= canonical repository -
origin= your fork - Previous release =
X.Y.0 - Patch release =
X.Y.1
# edit these lines:
export OLD_VERSION="X.Y.0"
export NEW_VERSION="X.Y.1"
export OLD_TAG="v${OLD_VERSION}"
export NEW_TAG="v${NEW_VERSION}"
export RELEASE_BRANCH="release/${NEW_VERSION}"
export PR_BRANCH="release-prep/${NEW_VERSION}"Fetch current upstream state:
git fetch upstream --tags
git fetch origingit switch -c "$RELEASE_BRANCH" "$OLD_TAG"
git push -u upstream "$RELEASE_BRANCH"git switch -c "$PR_BRANCH"This branch stays on your fork.
git cherry-pick <COMMIT_SHA1> <COMMIT_SHA2>If conflicts occur, resolve and then:
git add <files>
git cherry-pick --continueIf git reports:
The previous cherry-pick is now empty
and the change is already present after conflict resolution:
git cherry-pick --skipIf that is unexpected, inspect before skipping:
git status
git show <COMMIT_SHA>
git diffTo abandon the cherry-pick:
git cherry-pick --abortBump version to $NEW_VERSION in setup.py and peft.__init__.py.
Then:
git add <files>
git commit -m "Prepare ${NEW_TAG} release"git push -u origin "$PR_BRANCH"On GitHub, create a PR:
- base repository: canonical/upstream repository
- base branch:
release/X.Y.1 - head repository: your fork
- head branch:
release-prep/X.Y.1
The PR should contain:
- the cherry-picked patch
- the release-specific changes
After review, merge it into the upstream release branch.
Then update your local branch:
git fetch upstream
git switch "$RELEASE_BRANCH"
git reset --hard "upstream/$RELEASE_BRANCH"Follow the remaining steps of the normal release procedure, except that you use the $RELEASE_BRANCH instead of the main branch.