Skip to content

Commit

Permalink
Add more to git tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
de Haan, Mark committed Jul 31, 2018
1 parent 90f46d5 commit 430f47c
Showing 1 changed file with 64 additions and 14 deletions.
78 changes: 64 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,38 @@
# Table of contents
- [Install on windows](#install-on-windows)
- [Creating your first git repository](#creating-your-first-git-repository)
- [Create a git folder for your repositories](#create-a-git-folder-for-your-repositories)
- [Create a local repository](#create-a-local-repository)
- [How to get Started with GitHub](#how-to-get-started-with-github)
- [Create a GitHub account](#create-a-github-acccount)
- [Generating SSH key](#generating-an-ssh-key)
- [Resources](#resources)
- [Git tutorial](#git-tutorial)
- [Install on windows](#install-on-windows)
- [Creating your first git repository](#creating-your-first-git-repository)
- [Create a git folder for your repositories](#create-a-git-folder-for-your-repositories)
- [Create a local repository](#create-a-local-repository)
- [How to get Started with GitHub](#how-to-get-started-with-github)
- [Create a GitHub account](#create-a-github-acccount)
- [Generating SSH key](#generating-an-ssh-key)
- [Resources](#resources)

# Git tutorial
## Install on Windows
1) Download git from [here](https://git-scm.com/downloads)
2) Go through the installer steps. It is recommended to look at every step, but if you do not understand a 100%, the default settings are OK

3) ...
4) Profit! You have installed git
3) You have installed git

> __NOTE__: The following parts all use the commandline. Windows users are recommended to install a decent terminal. If you do not have one, the Git Bash terminal will work as well
## How to get started with GitHub
Go to [GitHub](https://github.com) and create an account

### Generating an SSH key
On your command line, type the following
```bash
git config --global user.email "[email protected]"
git config --global user.name "Mona Lisa"

ssh-keygen -t rsa -C "[email protected]"

cp ~/.ssh/id_rsa.pub > /dev/clipboard
```

Now that you have copied your public SSH key to your keyboard, in GitHub go to Settings -> SSH and GPG keys and add your key with a nice label

## Creating your first git repository
It is good practice to have your git repositories in one place.
For the following paragraphs, our git folder will be in `C:\Users\user\Documents\`
Expand All @@ -31,11 +47,45 @@ cd git
```

### Create a local repository
Go to the [repository for this course](https://github.com/atos-datascience/data-analytics-and-science) and press the Fork button in the top right

## How to get started with GitHub
This will fork the repository and create a local copy on your GitHub account. This copy can be edited, removed, destroyed, ruined I do not care.
On that copy, Press clone or download and copy the URL you see.

Next, inside your git folder use the following command
```bash
git clone [email protected]:<your_name_here>/data-analytics-and-science.git
```

### Create a GitHub account
It will create a data-analytics-and-science folder for you

### Generating an SSH key
```bash
cd data-analytics-and-science
git status
git remote -v
```

## Making your first change
Make a change, open a jupyter note book, do something cool.

```bash
# See the changes
git status

# Add changes to file tracker
git add .

# Add all changes to the tree
git commit -m "Add making your first change to README"

# Push changes to master on origin
git push origin master
```

## Opening a pull request

## Updating local repository and keeping your fork in sync

## Resources
- [Git cheat sheet](https://www.atlassian.com/git/tutorials/atlassian-git-cheatsheet)
- [What is Git](https://www.atlassian.com/git/tutorials/what-is-git)

0 comments on commit 430f47c

Please sign in to comment.