@Jean-Marc Thanks for posting this question. You have most of it figured out:
If you want to contribute to the project, then:
- Fork the pyRevit repo under your own account
- Clone the fork on your machine (
origin
remote points to your fork) - Checkout the
develop
branch and build the project. Look at the help ondev/pyrevit.py
script - If you need to make your custom changes to pyRevit that are not going back to the main repo, then create a custom branch for yourself e.g.
dev/my-pyrevit
- Here is how I’d approach the branching. Let’s say you found a bug that your want to fix on your side and push to the main pyRevit repo as well:
- Create a branch (from
develop
) for the work on fixing this bug e.g.issues/788
(# refers to the issue number on github, orissues/some-bug
) - Fix the issue and commit
- Merge this branch into
develop
and push to your fork - Create a PR from
develop
of your fork, to the original pyRevitdevelop
. Github web interface makes this very easy - It might take me a while to merge your PR into the repo, but meanwhile you have the fix on your local clone and your fork
- Then if you have your own dev branch, merge the issue branch into your dev branch as well so you have the fixes.
Now if you want to stay updated with the changes the pyRevit, then you need to periodically pull the changes from the original pyRevit repo (forks of a repo do not automatically synchronize). If that is the case then add a new remote to your clone and call it upstream
and set it to the original pyRevit repository. When you want the new changes, pull from upstream/develop
into your develop
and it will bring all the commits that are missing from yours.
All of this sounds daunting especially if you are using git
on the command line. I highly advise using a git GUI like Fork or any of these that you are more comfortable with.