-
Notifications
You must be signed in to change notification settings - Fork 9
Source Control
Your personal folder is /home/<RCS ID>
. Make sure you are in this folder by typing cd /home/<RCS ID>
into the Terminal.
Once there, type git clone https://github.com/TheRensselaerIDEA/MortalityMinder.git
. This will clone the repository onto your personal folder.
Once done, enter the folder by typing cd MortalityMinder
. To see this visually, navigate to MortalityMinder
in your Files
panel on RStudio.
We will not be committing to master
, as this is bad practice. Instead, we will make a new branch for each new feature we would like to implement. This details how to do so.
Verify you're in the right folder by typing pwd
into your Terminal. It should say /home/<RCS ID>/MortalityMinder
.
Verify what branches are available by typing git branch
. The list of branches will print, and the branch you're on will be shown by an asterisk.
To create a new branch, type git branch <BRANCH NAME>
, with <BRANCH NAME>
being the name of the new branch.
Then, switch to the new branch by typing git checkout <BRANCH NAME>
. To add this branch to the MortalityMinder GitHub repository, type git push origin <BRANCH NAME>
. RStudio will prompt you to put in your GitHub username and password, and may ask you to do a git-config
command so that it knows who authors your future commits.
Verify on GitHub that the branch exists now.
Now, make your changes like you normally do. Once you're ready to commit to the online repository, do the following:
- Type
git add -A
- Type
git commit -m "<COMMIT MESSAGE>"
, with being what your changes are about. - Type
git push
, and put in your username and password if it prompts you to do so.
Verify on GitHub that you see the commits on this branch.
Go on GitHub and make a pull request. This will not merge to master
just yet, but it makes a request. You might have to resolve a merge conflict, but that's self explanatory. When someone on the Core App team reviews your pull request, s/he can accept it and the code will be merged to master
.