-
Notifications
You must be signed in to change notification settings - Fork 17
Rebase Process Against Element iOS
Get news Element features / bugfix / security fix .
These features could be integrated or hidden in Tchap.
It is recommended to do rebases regularly in order to avoid having big conflicts.
/!\ Choose a stable release version.
This method will help you during the PR review. You will have the possibility to compare the conflicts commit with the resolve commit.
Create branch from develop (this branch will have to be regularly updated): "element-rebase". We will merge all the rebases in this branch and after the branch will be merged in develop.
git remote add upstream git@github.com:vector-im/element-ios.git --no-tags
git fetch upstream tag vX.X.X
git checkout origin/develop -b rebase/element-ios-X.X.X
git merge vX.X.X
git stash -u
Restart your merge and commit without doing any changes and with the template message "Merge vector-im/element-ios vX.X.X into element-rebase"
git merge --abort
git merge vX.X.X -m "Merge vector-im/element-ios vX.X.X into element-rebase"
git add .
git merge --continue
git checkout stash -- .
git add .
git commit -m 'explain your changes here'
git tag --merged upstream/main | xargs git tag -d
git tag --no-merged develop | xargs git tag -d
git push origin rebase/element-ios-X.X.X
Create a pull request to merge your branch into element-rebase. (Don't squash element commits: we want to preserve the git history)
At this step, your working tree should be clean, be sure that you don't have remaining uncommitted files.
git log --pretty=format:"%H" --merges -n 1 | xargs git reset --soft
git commit --amend
git push origin rebase/element-ios-X.X.X --force-with-lease
When PR was merged you should add a tag on the commit to checkout easily this merge in the future if necessary.
git checkout develop
git tag element_vX.X.X
git push origin refs/tags/element_vX.X.X