---
# System prepended metadata

title: Git/Github Intro

---

# Git/Github Intro

Steps in tutorial 
1) create Github account if you don't have one
2) Create new repository (Repositories>New)
    a) public repository
    b) name it something useful
    c) initialize/create - you should then see options to populate it on git hub or from an existing repository
4) open terminal, ssh into CRC
5) (moving away from terminal) - open link ^ and follow directions to ‘assign yourself’
6) (back to terminal) enter command “echo “#BIPWeek_username” >> README.md
7) create git repository on command line using command ```git init```
8) command ```git add README.md``` to add new file (README.md) to the new git repository you made in step 7
9) ```git commit -m "first commit, added readme"``` to commit to repository
10) (back to web browser) - go to new repository page you made on github, and copy the text on the 'git remote add line'
```git remote add origin https://github.com/username/bipweek_crivaldi.git```
10) (back to terminal) run code you copied in step 10 - this connects the repository you created on your computer to the one you created on github
11) Push your repository to Github ```git push origin master``` - you'll be prompted for your username and password 
12) (Back to web browser) go to repository and find the settings option on the top left. Click settings, scroll down to Github Pages, then select source as 'Master Branch'


## This link will direct you through a tutorial to get to know GitHub and GitHub pages: https://lab.github.com/githubtraining/introduction-to-github


## Using Git with Rstudio
http://swcarpentry.github.io/git-novice/14-supplemental-rstudio/index.html
Open Rstudio and open a new project, select version control and then select Git - this will give you a graphical interface that will let you see your project history and version control easily

## Github pages 
https://librarycarpentry.org/lc-git/05-github-pages/index.html
