-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgit-workflow.qmd
33 lines (20 loc) · 1.67 KB
/
git-workflow.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Git and Github workflow
(This is not meant to be a complete guide to git, but rather a short summary of key commands)
After your fork the `bmm` repository and create a branch for your new model/feature, you can follow a typical git workflow. As you make changes and add new files, you will want to:
## Git commands
[Add](https://www.atlassian.com/git/tutorials/saving-changes) your changes to git, [commit](https://www.atlassian.com/git/tutorials/saving-changes/git-commit) them and then [push](https://www.atlassian.com/git/tutorials/syncing/git-push) your changes to your forked repository. You can run these commands from a terminal or from the RStudio terminal (with the project working directory)
Add all changed files to the staging area:
``` bash
git add *
```
Commit the changes to the local repository
``` bash
git commit -m "A short message describing the changes you made"
```
Push the changes to your forked repository
``` bash
git push
```
You can (and should) repeat this process as many times as you need to before submitting a pull request. This will allow you to make many small changes and test them before submitting a pull request. Ideally each commit should be a small, self-contained change that can be easily reviewed.
## Pull requests
When you are ready you can open a pull request from your forked repository to the main bmm repository. You can do this from the github website. Make sure to select the Develop branch as the base branch and your feature branch as the compare branch. You should add a detailed description of your changes, including the motivation for the changes and any relevant context. You should also mention any issues that your pull request resolves.