code.gitea.io/gitea@v1.21.7/contrib/backport/README (about) 1 `backport` 2 ========== 3 4 `backport` is a command to help create backports of PRs. It backports a 5 provided PR from main on to a released version. 6 7 It will create a backport branch, cherry-pick the PR's merge commit, adjust 8 the commit message and then push this back up to your fork's remote. 9 10 The default version will read from `docs/config.yml`. You can override this 11 using the option `--version`. 12 13 The upstream branches will be fetched, using the remote `origin`. This can 14 be overrided using `--upstream`, and fetching can be avoided using 15 `--no-fetch`. 16 17 By default the branch created will be called `backport-$PR-$VERSION`. You 18 can override this using the option `--backport-branch`. This branch will 19 be created from `--release-branch` which is `release/$(VERSION)` 20 by default and will be pulled from `$(UPSTREAM)`. 21 22 The merge-commit as determined by the github API will be used as the SHA to 23 cherry-pick. You can override this using `--cherry-pick`. 24 25 The commit message will be amended to add the `Backport` header. 26 `--no-amend-message` can be set to stop this from happening. 27 28 If cherry-pick is successful the backported branch will be pushed up to your 29 fork using your remote. These will be determined using `git remote -v`. You 30 can set your fork name using `--fork-user` and your remote name using 31 `--remote`. You can avoid pushing using `--no-push`. 32 33 If the push is successful, `xdg-open` will be called to open a backport url. 34 You can stop this using `--no-xdg-open`. 35 36 Installation 37 ============ 38 39 ```bash 40 go install contrib/backport/backport.go 41 ```