-
Notifications
You must be signed in to change notification settings - Fork 40
How To Git
PharmCAT uses the Conventional Commit convention.
feat
, perf
, and fix
commit types will get listed in the change log, so please include a scope when using those types.
Scopes:
- data
- datamanager
- preprocessor
- namedallelematcher
- reporter
- docker
- website
If you are working against the repo directly instead of using GitHub's pull requests, please use git rebase instead of git merge.
Why not merge? A comparison and some horror stories.
This is a very brief outline of what you should do before pushing your commits to the repository. If you just want to update to the latest from the repository, you can skip the last step.
git fetch
git status
- maybe
git stash
-
git pull
orgit pull --rebase
git push
Breaking it down:
# git fetch
This gets the latest changes from the repository.
# git status
This shows you your status.
If there are no changes, you can skip directly to git push
.
If it says that you "can be fast-forwarded":
# git status
On branch main
Your branch is behind 'origin/main' by 2 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
...
Then you can update with git pull
.
Otherwise, if you've diverged:
# git status
On branch main
Your branch and 'origin/main' have diverged,
and have 2 and 3 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
...
Then you can update with git pull --rebase
.
If you have local changes, you will need to stash your changes first:
# git stash
And once you're done, recover your changes:
# git stash pop
Finally:
# git push
This pushes your commits to the repository.