-
Notifications
You must be signed in to change notification settings - Fork 38
Submitting changes
This page is replaced by https://github.com/HyphaApp/hypha-docs/blob/main/contributing/submittingchanges.md
We use pull requests for all changes. No commits are done directly in to the main branches. The "master" branch is protected and only maintainers can merge to it.
We commonly use fix/*, enhancement/*, feature/* bug/* and updates/* as base for the branch names.
A good idea is to include the GitHub issue number in the format "*/gh-1234-*".
Write it so other developers, and your future self, can understand what was changes and why.
A rebase makes sure the PR is up to date and has no merge conflicts. Please do a rebase and not just a merge, this gives a clean and readable commit history.
A common way is to add "Fixes #1234" at the top of the PR description. See Linking a pull request to an issue
If noting else has been agreed upon add Fredrik Jonsson @frjo.
First check out master and do a git pull ot get all the latest updates.
Then create a new branch and do a checkout of it.
$ git checkout master
$ git pull
$ git checkout -b fix/gh-1234-fixing-thing-a
$ git add
$ git commit -m "A good commit message."
First make sure we are in the correct branch. Then push the branch to origin, i.e. GitHub in this case.
(Pushing to HEAD is equivalent to pushing to a remote branch having the same name as your current branch.)
$ git checkout fix/gh-1234-fixing-thing-a
$ git push -u origin HEAD
The message in the Terminal will contain the URL to create an PR. On most systems you can Command/CTRL click that to open it directly in your default browser.
Checkout master and update it. Checkout the branch you are working on and issue the command to rebase it from master. If that resulted in any changes you will then need to do a force push to GitHub.
$ git checkout master
$ git pull
$ git checkout fix/gh-1234-fixing-thing-a
$ git rebase master
$ git push --force
Read more about Git rebase.
Thanks for wanting to help make Hypha better!