From cd1b39fdfd015ea2b2840eadddf621b94045def8 Mon Sep 17 00:00:00 2001 From: Sam Hinshaw Date: Wed, 7 Sep 2016 21:46:21 -0700 Subject: [PATCH 1/5] changing less to cat for ease of use --- 10_connect-git-github.Rmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/10_connect-git-github.Rmd b/10_connect-git-github.Rmd index 10ce793..d561e63 100644 --- a/10_connect-git-github.Rmd +++ b/10_connect-git-github.Rmd @@ -48,7 +48,7 @@ Make this new repo your working directory, list its files, display the README, a ``` bash cd myrepo ls -less README.md +cat README.md git remote show origin ``` @@ -60,7 +60,7 @@ jenny@2015-mbp ~ $ cd myrepo jenny@2015-mbp myrepo $ ls README.md -jenny@2015-mbp myrepo $ less README.md +jenny@2015-mbp myrepo $ cat README.md # myrepo tutorial development From 958f05c1b1681028356a1e4c4cce472c97ceae68 Mon Sep 17 00:00:00 2001 From: Sam Hinshaw Date: Thu, 8 Sep 2016 10:02:44 -0700 Subject: [PATCH 2/5] change cat to head --- 10_connect-git-github.Rmd | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/10_connect-git-github.Rmd b/10_connect-git-github.Rmd index d561e63..3c77577 100644 --- a/10_connect-git-github.Rmd +++ b/10_connect-git-github.Rmd @@ -48,7 +48,7 @@ Make this new repo your working directory, list its files, display the README, a ``` bash cd myrepo ls -cat README.md +head README.md git remote show origin ``` @@ -60,7 +60,7 @@ jenny@2015-mbp ~ $ cd myrepo jenny@2015-mbp myrepo $ ls README.md -jenny@2015-mbp myrepo $ cat README.md +jenny@2015-mbp myrepo $ head README.md # myrepo tutorial development @@ -109,6 +109,7 @@ git add -A git commit -m "A commit from my local computer" git push ``` +The `-m` flag is an important message that must be included with every commit! Failure to supply a commit message This should look something like this: From d6bdcde07e96104005231d3e1f92b6b029897a39 Mon Sep 17 00:00:00 2001 From: Sam Hinshaw Date: Thu, 8 Sep 2016 12:05:32 -0700 Subject: [PATCH 3/5] explain the necessity for Git Bash on Windows (versus command prompt) --- 08_install-introduce-self-git.Rmd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/08_install-introduce-self-git.Rmd b/08_install-introduce-self-git.Rmd index 9ca1236..dbadb61 100644 --- a/08_install-introduce-self-git.Rmd +++ b/08_install-introduce-self-git.Rmd @@ -14,6 +14,8 @@ substituting your name and **the email associated with your GitHub account**. From RStudio, go to *Tools > Shell* and tell Git your name and **GitHub email** by typing (use your own name and email): +Note: If you are on Windows, make sure this has opened *Git Bash*, and not Windows Command Prompt! If it has not, restarting RStudio may fix this issue. Otherwise, you can open *Git Bash* from the Windows menu, or [change the option](https://support.rstudio.com/hc/en-us/articles/200532077-Version-Control-with-Git-and-SVN) via *Options -> Version Control*. + * `git config --global user.name 'Jennifer Bryan'` - This does __NOT__ have to be your GitHub username, although it can be. Another good option is your actual first name and last name. Your commits will be labelled with this name, so this should be informative to potential collaborators. From 809f1bda9076b14a9830ee8970c2745c3226f319 Mon Sep 17 00:00:00 2001 From: Sam Hinshaw Date: Wed, 25 Jan 2017 10:07:46 -0800 Subject: [PATCH 4/5] updating commit message warning explaining that git requires a commit message, and a suggestion about practicing good commit messages. --- 10_connect-git-github.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/10_connect-git-github.Rmd b/10_connect-git-github.Rmd index 3c77577..1eff251 100644 --- a/10_connect-git-github.Rmd +++ b/10_connect-git-github.Rmd @@ -109,7 +109,7 @@ git add -A git commit -m "A commit from my local computer" git push ``` -The `-m` flag is an important message that must be included with every commit! Failure to supply a commit message +The `-m` flag is an important message that must be included with every commit! Git requires a commit message for every commit, so if you forget the `-m` flag, git will prompt you for a commit message anyways. It is good practice to write meaningful commit messages so in the future, potential collaborators (and your future self) will understand the progression of a project. This should look something like this: From ea7ecb66c2c84323abe43aa9b283b3f5e3bc2bba Mon Sep 17 00:00:00 2001 From: Sam Hinshaw Date: Thu, 26 Jan 2017 12:10:47 -0800 Subject: [PATCH 5/5] updating wording on Windows troubleshooting explained how to tell if you are in Git Bash or not. explained how to get RStudio to open Git Bash for you --- 08_install-introduce-self-git.Rmd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/08_install-introduce-self-git.Rmd b/08_install-introduce-self-git.Rmd index dbadb61..c7af2b5 100644 --- a/08_install-introduce-self-git.Rmd +++ b/08_install-introduce-self-git.Rmd @@ -14,7 +14,9 @@ substituting your name and **the email associated with your GitHub account**. From RStudio, go to *Tools > Shell* and tell Git your name and **GitHub email** by typing (use your own name and email): -Note: If you are on Windows, make sure this has opened *Git Bash*, and not Windows Command Prompt! If it has not, restarting RStudio may fix this issue. Otherwise, you can open *Git Bash* from the Windows menu, or [change the option](https://support.rstudio.com/hc/en-us/articles/200532077-Version-Control-with-Git-and-SVN) via *Options -> Version Control*. +Note: If you are on Windows, check the title bar of the shell that was opened! If you see `cmd.exe` at the end of the status bar, this is the Windows Command Prompt. If you instead see `MINGW64` at the beginning, you have successfully opened Git Bash! + +Note: If you are **not** in an R Project that is version controlled with git, *Tools > Shell* will open Windows Command Prompt. If this is the case and RStudio still opens `cmd.exe`, check *Tools > Global Options > Git/SVN* and tick the box for "Use Git Bash as shell for Git projects". You may need to restart RStudio. * `git config --global user.name 'Jennifer Bryan'`