Promote free/libre software on the EPFL campus
$ git status
On branch main
Your branch is up to date with 'origin/main'.
If no new commits were made, this is a fast-forward
$ git checkout feature
$ git rebase main
// if there are conflicts, solve them and continue with:
// git rebase --continue
$ git push
$ git checkout feature
$ git rebase main
// if there are conflicts, solve them and continue with:
// git rebase --continue
$ git push
// finally create pull/merge request on github/gitlab
// the remote server merges main and feature after approval
The goal is to allow other developers to review your code before it's added to the project's main branch
Manually merge main
$ git checkout feature
$ git rebase main
// if there are conflicts, solve them and continue with:
// git rebase --continue
$ git push --force // --force is ok since on feature branch
$ git checkout main
$ git merge feature
$ git push // do NOT --force on main branch
Avoid manual merge, use pull/merge requests