You have git installed on your computer.
You have introduced yourself to git using git config
in a shell.
You have registered with https://research-git.uiowa.edu.
Look at the brief introduction to git or the beginning of http://happygitwithr.com if you still need to do any of this.
https://research-git.uiowa.edu/stat7400-spring-2020/<hawkid>.git
with <hawkid>
replaced with your HawkID.Open the README.md
file for your project in RStudio, add something to it, and save the changes.
From the Tools menu choose Version Control and then Commit.
Check the box next to README.md
, write a commit message, and press the Commit button.
Close the version control window. Your changes have been committed to your local repository.
You can also use the Git panel for the preceding steps.
To push your changes to GitLab, from the Tools menu choose Version Control and then Push Branch. You may have to provide your HawkID and password at this point.
You should now be able to see your changes in your remote repository in the class group.
Open a shell.
Go to the parent directory where you want your local repository to live.
In the shell, give the command
https://research-git.uiowa.edu/stat7400-spring-2020/<hawkid>.git <dirname>
with <hawkid>
replaced by your Hawk ID and <dirname>
by the directory name you want.
You can omit the directory name if you are happy with the default, the name of your repository.
Change your working directory to your local repository (cd <dirname>
on Linux).
Edit README.md
and save.
Commit your changes with the command
git commit -m "My commit message." README.md
Push your changes with the command
git push
If you want to manage this repository from RStudio you can turn it into an RStudio project by creating a new project and choosing the Existing Directory option.
It is a good idea to commit often.
If you work on several computers, or with a collaborator, be sure to pull changes from the repository before starting to work on new changes.
You do not have to push after every commit, but it’s a good idea to do so.