-
Notifications
You must be signed in to change notification settings - Fork 7
Rebase Process Against Element Android
Get news Element features / bugfix / security fix .
Theses 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 [email protected]:element-hq/element-android.git --no-tags
git lfs fetch upstream --all
git fetch upstream tag vX.X.X
git checkout origin/develop -b rebase/element-android-X.X.X
git merge vX.X.X
git stash -u
git merge vX.X.X -m "Merge element-hq/element-android 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-android-X.X.X
git lfs push origin --all
Create a pull request to merge your branch into element-rebase. (Dont squash element commits: we want to preserve the git history)
When you PR is approved, you can squash your commits; only your merged commits not the element commits.
git log --pretty=format:"%H" --merges -n 1 | xargs git reset --soft
git commit --amend
git push origin rebase/element-android-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