

#Find all version of git on mac how to
If you want to learn how to use git from the command line, I recommend working through the Software Carpentry git lessons that can be found here. We will be using git exclusively with RStudio. Git is often used with a shell program that allows you to directly access the command line. Git is a program that tracks changes to files in a directory and allows you to revert to any previously saved state. In the next section you will learn how to use git with RStudio to manages changes to a version of the class website files stored on your computer. The best way to do this is by using a version control program called git. While it is useful to be able to edit files online, usually you will want to make changes to files on your computer and then propose changes from these files to a project repository on GitHub. Now someone will need to review your changes and accept them in order for the FukamiLab project to change. Click the green button again to create the request. You will then be prompted to create a description of your changes so that a reviewer (e.g. the instructor) knows what to look for before accepting the changes. Click the green “Create pull request” button to propose these changes. Once you have selected the base (to) and head (from) branches you can scroll down to see how the files differ. You may need to click “compare across forks” to make the FukamiLab master branch show up as an option.

What should the base and head be if you want to propose the changes you just made? The base is what you are proposing to change and the head is where the changes are coming from. Return to the main page of your fork at and click the “New pull request” button. You will propose to change FukamiLab/BIO202 based on the changes you made in your-username/BIO202. We will do this using a “pull request” which is a fancy name for proposing changes. Next we will transfer these changes to the FukamiLab version. You have added your name to the lesson Rmd file in your fork of the class website. Everything you work on will be commited to the “master” branch. However, we won’t be using them in our class. Branches are useful when you are working on different aspects of a project or when multiple users are contributing to the same project. You will not need to create new branches when working on our class website because each person will be making changes to their own fork. Then, commit the changes to the master branch by clicking the green “Commit” button. In the box at the bottom, type a short description of the changes you made in the fist box.

You will be taken to an editor where you can then type your name alongside the instructor name at the top of the document. To edit this file, click the pencil button in the upper right corner. To see the underlying text you can click “Raw”. Because the text file is written in Rmarkdown, GitHub attempts to display the formatting that it understands. This will show you the partially rendered contents of the file. The first number gives the week and the letter refers to the class session (A-Mon, B-Wed, C-Fri). Let’s add your name to the webpage for the lesson that you will be leading.Ĭlick on the Rmarkdown file (.Rmd) corresponding to the lesson that you will be leading. You can make changes to files in a project directly from your web browser.
