diff --git a/README.md b/README.md index 97bcf7d..c47ec66 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/git-01_basics.md b/git-01_basics.md index f6683b1..4fc676e 100644 --- a/git-01_basics.md +++ b/git-01_basics.md @@ -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 | |:-------------------|:-------------------------------------------------| @@ -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. diff --git a/git-02_remotes.md b/inprogress/git-02_remotes.md similarity index 100% rename from git-02_remotes.md rename to inprogress/git-02_remotes.md diff --git a/git-03_branches.md b/inprogress/git-03_branches.md similarity index 94% rename from git-03_branches.md rename to inprogress/git-03_branches.md index f3bf8d7..7739f18 100644 --- a/git-03_branches.md +++ b/inprogress/git-03_branches.md @@ -1 +1,2 @@ ## Git branches + diff --git a/setup.md b/setup.md index 16005e4..b559734 100644 --- a/setup.md +++ b/setup.md @@ -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`