Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
## Intro to Git and GitHub

* The slides are available here: http://slides.com/kirschbombe/git-7/fullscreen
* The slides are available here: http://slides.com/kirschbombe/learngit/fullscreen
* Setup instructions here: https://github.com/kirschbombe/learngit/blob/master/setup.md
* You will also need a GitHub account. You can get one here: https://github.com

#### Bash commands we'll use
* `cd` : change directory
* `cd ..` : move up to the parent directory
* `ls` : list directory contents
* `ls > list.csv` : print directory contents to a CSV named `list.csv`
* `touch` : create new file here
* `pwd` : print working directory
* `cat` : "concatenate", used to print the contents of a file
Expand Down
22 changes: 13 additions & 9 deletions git-01_basics.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
## Git exercises

### Configuring Git
We do this by setting a couple of options in a file found in your home directory

First, let's verify that Git is installed by typing the `git` command (then hit enter)

```bash
git config --global user.name "Firstname Lastname"
git config --global user.email username@company.extension
git
```

Your name and email address is included in every change that you make, so it's easy to keep track of who did what
This should print out usage and common Git commands. If you get something else, then you probably didn't do the pre-class setup! You can follow the instructions for installing Git here: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git

Also, unless you are a vimwizard, I would recommend changing your default editor to nano
Now that we've verified Git is installed, let's set up a couple of options in a file found in your home directory

```bash
git config --global core.editor nano
git config --global user.name "Firstname Lastname"
git config --global user.email username@company.extension
```

If you have a different favorite editor, you can type in the appropriate
command from the table below:
Your name and email address is included in every change that you make, so it's easy to keep track of who did what

Also, unless you are a vimwizard, I would recommend changing your default editor to nano or your favorite text editor

If you have a favorite editor, you can type in the appropriate command from the table below:

| Editor | Configuration command |
|:-------------------|:-------------------------------------------------|
Expand Down Expand Up @@ -137,7 +141,7 @@ We use the `-m` flag followed by a **commit message** when we make a commit. Eve

> Making a whole bunch of changes and committing them all at once is *BAD*. If you make many commits for many small changes, and one of those changes breaks your code, you can *selectively undo* that change and fix the bug. If you make only one commit, you'll have to re-do everything from scratch :(

It takes a while to get a hang of this, and it helps to read other people's commits to know what to say
It takes a while to get the hang of this, and it helps to read other people's commits to know what to say

6. Take a few minutes to make some changes to your mammals.txt file and add a new file to your folder. Then add the changes to the staging area and commit your changes following the steps you just took in 4-5.

Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions git-03_branches.md → inprogress/git-03_branches.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
## Git branches

2 changes: 1 addition & 1 deletion setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ To set your Babun HOME directory to `C:\Users\[username]`, follow these steps:
* From your Babun shell, execute `rundll32 sysdm.cpl,EditEnvironmentVariables` or search in the Start menu for `env` and select "Select Edit environment variables for your account”
* Select “New”
* Name: HOME
* Value: C:\Users\[username]
* Value: `C:\Users\[username]`
* Click on “OK”
* Click on “OK” again
* In Babun, run `babun install`
Expand Down