From 4f3ba01d6e9d2bbe603fdbeba2815a13d09ddcfa Mon Sep 17 00:00:00 2001 From: jordanmccullough Date: Thu, 24 Apr 2014 16:51:34 -0600 Subject: [PATCH 01/12] Tune section titles, command examples --- workbooks/github-intermediate.md | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/workbooks/github-intermediate.md b/workbooks/github-intermediate.md index eb4f491f2..0219e1df1 100644 --- a/workbooks/github-intermediate.md +++ b/workbooks/github-intermediate.md @@ -249,6 +249,8 @@ $ git branch -a * Folding in branches * Resolving conflicting merges (manually edit) * Resolving file with shortcuts +* Updating topic branch from a base branch +* Integrating separate repo history #### Details ``` @@ -264,6 +266,10 @@ $ git checkout --theirs [file] $ git add [file] $ git commit + +$ git merge [base] + +$ git pull [repository] [branch] ``` ## Fetching changes @@ -271,11 +277,15 @@ $ git commit ### Summary * Comparing without merge * Merging selectively +* Retrieving from other repositories #### Details ``` $ git fetch [remote] $ git branch -a + +$ git fetch [repository] [branch] +$ git show FETCH_HEAD ``` ## Removing files @@ -302,13 +312,15 @@ $ git rm --cached -- ```shell $ mv $ git add -A . + # or + $ git mv $ git log --stat -M $ git log --follow ``` -## Undoing commits with `revert` and `reset` +## Undoing commits ### Summary * Generating commit to restore past patch set @@ -364,7 +376,7 @@ $ git pop $ git stash --include-untracked ``` -## Recovering almost anything with the `reflog` +## Recovering almost anything ### Summary * Tracing Git action "history" @@ -376,13 +388,24 @@ $ git reflog $ git reflog --all $ git config --global alias.undo "reset HEAD@{1}" $ git checkout HEAD@{1} + +$ git reset --hard HEAD@{1} + +$ git branch [name] HEAD@{1} ``` ## Pull requests ### Summary * Pushing branch to repo -* Creating GH pull request +* Using GitHub interface +* Retrieving locally + +``` +$ git push -u [remote] [branch] + +$ git fetch [remote] refs/pull/[issue-number]/head +``` ## GitHub Issues @@ -399,6 +422,7 @@ $ git checkout HEAD@{1} #### Details ``` +$ git config --global alias.lol "log --graph --all --oneline --decorate" $ git config --global alias.l "log --oneline --stat" $ git config alias.s "status -s" $ git s From 4b47f6d186fd1cf71dde2d917c3a736b04d0c188 Mon Sep 17 00:00:00 2001 From: jordanmccullough Date: Thu, 24 Apr 2014 17:14:04 -0600 Subject: [PATCH 02/12] Revise intro topic lists and order MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit “Getting to know” feels more complete with a broader survey of GitHub and Git than just one exclusively. Moving the order of acquiring the code first, then focusing on branches seems more logical so local and upstream branches can be discussed all at once. --- workbooks/github-foundations.md | 39 +++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/workbooks/github-foundations.md b/workbooks/github-foundations.md index 6753d80be..e0048939f 100644 --- a/workbooks/github-foundations.md +++ b/workbooks/github-foundations.md @@ -65,12 +65,22 @@ Git can be installed as a unified GitHub GUI and command line or merely as a sta * GitHub GUIs for Mac, Windows * Command line -## Getting to know GitHub +## Getting to know Git & GitHub ### Summary * Repository initialization + * New project and new repository + * Repository based on existing content + * Through web interface + * Web interface and GUI client * Actionable steps (Create, Edit, Remove, Move) -* Commits (page) + +## Acquiring repos + +### Summary +* Clone from web (Clone in Desktop button) +* Clone via personal repo list in GitHub Desktop +* Complete "copy" explanation ## Version control basics @@ -79,18 +89,19 @@ Git can be installed as a unified GitHub GUI and command line or merely as a sta * Line-level tracking * Commit messages * Grouping files (with desktop clients) -* Branching - * Branching concepts - * Branch selection menu - * Branch listing page - * Branch comparison view - -## Acquiring repos - -### Summary -* Clone from web (Clone in Desktop button) -* Clone via personal repo list in GitHub Desktop -* Complete "copy" explanation + * .com Commits page +* Branches (general) + * Container for grouped commits + * Simpler means to integrate change + * Cleaner code review possibilities +* Branches (GitHub.com) + * Selection menu + * Listing page + * Comparison view +* Branches (GitHub for Desktop) + * Create + * Change + * Publish ## Local repository interaction From afaa3de96c8664b64358a94c0108a593bedc8691 Mon Sep 17 00:00:00 2001 From: jordanmccullough Date: Thu, 24 Apr 2014 17:31:26 -0600 Subject: [PATCH 03/12] Add GitHub shortcuts Foundations course serves as survey of GitHub features and should include efficiency tips including these keyboard shortcuts. --- workbooks/github-foundations.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/workbooks/github-foundations.md b/workbooks/github-foundations.md index e0048939f..1636cec4a 100644 --- a/workbooks/github-foundations.md +++ b/workbooks/github-foundations.md @@ -148,6 +148,14 @@ Git can be installed as a unified GitHub GUI and command line or merely as a sta * Network graph * Activity graph +## GitHub shortcuts + +### Summary + +* `/` command bar +* `?` help +* `t` fuzzy file search + ## Project management basics ### Summary From a707e3a540bfb95a2b1ecd22ed07c82798db50a8 Mon Sep 17 00:00:00 2001 From: jordanmccullough Date: Thu, 24 Apr 2014 17:32:12 -0600 Subject: [PATCH 04/12] Revise "commit" topic bullets --- workbooks/github-foundations.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/workbooks/github-foundations.md b/workbooks/github-foundations.md index 1636cec4a..043e1d5fb 100644 --- a/workbooks/github-foundations.md +++ b/workbooks/github-foundations.md @@ -89,7 +89,8 @@ Git can be installed as a unified GitHub GUI and command line or merely as a sta * Line-level tracking * Commit messages * Grouping files (with desktop clients) - * .com Commits page + * Distinction of commit process on GitHub + * Listing page on GitHub * Branches (general) * Container for grouped commits * Simpler means to integrate change From 88b77f9ac20385ed72da15cef5e1c7cc3efa384f Mon Sep 17 00:00:00 2001 From: jordanmccullough Date: Thu, 24 Apr 2014 17:32:47 -0600 Subject: [PATCH 05/12] Add additional "Management" bullet topics --- workbooks/github-foundations.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/workbooks/github-foundations.md b/workbooks/github-foundations.md index 043e1d5fb..402884051 100644 --- a/workbooks/github-foundations.md +++ b/workbooks/github-foundations.md @@ -164,3 +164,7 @@ Git can be installed as a unified GitHub GUI and command line or merely as a sta * Milestones * Pulse * Tags, Releases +* Collaborators +* Organizations +* Teams + From b9bee10f5f7b590644a93e7021944115ccf61f79 Mon Sep 17 00:00:00 2001 From: jordanmccullough Date: Thu, 24 Apr 2014 17:33:20 -0600 Subject: [PATCH 06/12] Add "Special Features" topics --- workbooks/github-foundations.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/workbooks/github-foundations.md b/workbooks/github-foundations.md index 402884051..b62d2f06d 100644 --- a/workbooks/github-foundations.md +++ b/workbooks/github-foundations.md @@ -168,3 +168,8 @@ Git can be installed as a unified GitHub GUI and command line or merely as a sta * Organizations * Teams +## Special Repository Features of GitHub +* Contributing.md +* License.md (and GitHub special dropdown) +* .gitignore (and GitHub special dropdown) +* Readme.md (in root, in subfolders) From 43af1664fc9a5ab72406bc53d3f59ae7347a2734 Mon Sep 17 00:00:00 2001 From: jordanmccullough Date: Fri, 25 Apr 2014 08:49:14 -0600 Subject: [PATCH 07/12] Correct header level for consistency --- workbooks/github-foundations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workbooks/github-foundations.md b/workbooks/github-foundations.md index b62d2f06d..ff04f9171 100644 --- a/workbooks/github-foundations.md +++ b/workbooks/github-foundations.md @@ -15,7 +15,7 @@ description: This student and teacher workbook will be your companion to the Git * [A short history of Git](http://git-scm.com/book/en/Getting-Started-A-Short-History-of-Git) * [The Git project homepage](http://git-scm.com) -#### Details +### Details __Git is an open source distributed__ version control system invented by Linus Torvalds in 2005. It is used to version the Linux kernel and is shown to be, by some research, the most popular modern version control system. Git is the open source, command line tool that forms a part of the workflows we'll cover in this course. It has been called the successor to CVS and Subversion by many users, and maintains some similarity in behavior to these historical open source version control tools. From 80656dfe9806e227977d28bd408b049058111a6f Mon Sep 17 00:00:00 2001 From: jordanmccullough Date: Fri, 25 Apr 2014 09:03:14 -0600 Subject: [PATCH 08/12] Separate commit topics between .com and desktop --- workbooks/github-foundations.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/workbooks/github-foundations.md b/workbooks/github-foundations.md index ff04f9171..96a420ed1 100644 --- a/workbooks/github-foundations.md +++ b/workbooks/github-foundations.md @@ -58,7 +58,7 @@ Sign up for a free GitHub account at https://github.com/join. Git can be installed as a unified GitHub GUI and command line or merely as a stand-alone command line interface. -## Ways of interacting with repositories +## Interacting with repositories ### Summary * [GitHub web flow](https://guides.github.com/overviews/flow/) @@ -73,7 +73,6 @@ Git can be installed as a unified GitHub GUI and command line or merely as a sta * Repository based on existing content * Through web interface * Web interface and GUI client -* Actionable steps (Create, Edit, Remove, Move) ## Acquiring repos @@ -85,12 +84,15 @@ Git can be installed as a unified GitHub GUI and command line or merely as a sta ## Version control basics ### Summary -* Commits - * Line-level tracking +* Commits (GitHub.com) + * Actionable steps (Create, Edit, Remove, Move) * Commit messages - * Grouping files (with desktop clients) - * Distinction of commit process on GitHub * Listing page on GitHub +* Commits (GitHub for Desktop) + * Managing file on system, reviewing results + * Line-level tracking + * Grouping files + * Synchronizing local commits * Branches (general) * Container for grouped commits * Simpler means to integrate change From 8c537fa0978dfa4c2e19eb29340662afe901580f Mon Sep 17 00:00:00 2001 From: jordanmccullough Date: Fri, 25 Apr 2014 09:17:13 -0600 Subject: [PATCH 09/12] Add new topic sections --- workbooks/github-foundations.md | 50 ++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 13 deletions(-) diff --git a/workbooks/github-foundations.md b/workbooks/github-foundations.md index 96a420ed1..dab311470 100644 --- a/workbooks/github-foundations.md +++ b/workbooks/github-foundations.md @@ -83,28 +83,27 @@ Git can be installed as a unified GitHub GUI and command line or merely as a sta ## Version control basics +### Summary +* Commits + * History marker for file(s), change(s) + * Record of author, time, and message +* Branches + * Container for grouped commits + * Simpler means to integrate change + * Cleaner code review possibilities +* GitHub, local repositories + +## GitHub repository interaction + ### Summary * Commits (GitHub.com) * Actionable steps (Create, Edit, Remove, Move) * Commit messages * Listing page on GitHub -* Commits (GitHub for Desktop) - * Managing file on system, reviewing results - * Line-level tracking - * Grouping files - * Synchronizing local commits -* Branches (general) - * Container for grouped commits - * Simpler means to integrate change - * Cleaner code review possibilities * Branches (GitHub.com) * Selection menu * Listing page * Comparison view -* Branches (GitHub for Desktop) - * Create - * Change - * Publish ## Local repository interaction @@ -116,6 +115,16 @@ Git can be installed as a unified GitHub GUI and command line or merely as a sta * History * Syncing (GHfD) +* Commits (GitHub for Desktop) + * Managing file on system, reviewing results + * Line-level tracking + * Grouping files + * Synchronizing local commits +* Branches (GitHub for Desktop) + * Create + * Change + * Publish + ## GitHub workflows ### Summary @@ -151,6 +160,20 @@ Git can be installed as a unified GitHub GUI and command line or merely as a sta * Network graph * Activity graph +## GitHub Wikis + +### Summary +* Fast documentation authoring for repositories +* Standalone repository +* Easy access from repository navigation + +## GitHub Pages + +### Summary +* Web page for your repository +* Web page for your account +* Author, edit, launch from GitHub + ## GitHub shortcuts ### Summary @@ -164,6 +187,7 @@ Git can be installed as a unified GitHub GUI and command line or merely as a sta ### Summary * GitHub Issues * Milestones +* Network * Pulse * Tags, Releases * Collaborators From c20ee9190e6a9e98d75b1e046f4a18be02bc9ed6 Mon Sep 17 00:00:00 2001 From: jordanmccullough Date: Fri, 25 Apr 2014 09:40:32 -0600 Subject: [PATCH 10/12] Add "Features" covering less-repo specific topics --- workbooks/github-foundations.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/workbooks/github-foundations.md b/workbooks/github-foundations.md index dab311470..96bdece1b 100644 --- a/workbooks/github-foundations.md +++ b/workbooks/github-foundations.md @@ -174,6 +174,18 @@ Git can be installed as a unified GitHub GUI and command line or merely as a sta * Web page for your account * Author, edit, launch from GitHub +## GitHub Features + +### Summary +* Notifications +* Watching repositories +* Starring repositories +* Gist +* GitHub Flavored Markdown + * Basics + * Emoji + * Checklists (Issues, Gists) + ## GitHub shortcuts ### Summary From a990476f6530020f0e0f4d38b51ee2c49a69d57f Mon Sep 17 00:00:00 2001 From: jordanmccullough Date: Fri, 25 Apr 2014 09:41:00 -0600 Subject: [PATCH 11/12] Revise "Special Features" topics of files on GH --- workbooks/github-foundations.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/workbooks/github-foundations.md b/workbooks/github-foundations.md index 96bdece1b..0b3d7d888 100644 --- a/workbooks/github-foundations.md +++ b/workbooks/github-foundations.md @@ -208,6 +208,12 @@ Git can be installed as a unified GitHub GUI and command line or merely as a sta ## Special Repository Features of GitHub * Contributing.md -* License.md (and GitHub special dropdown) -* .gitignore (and GitHub special dropdown) -* Readme.md (in root, in subfolders) +* License.md + * During repository creation + * `+` a file with existing repository (special dropdown) +* .gitignore + * During repository creation + * `+` a file with existing repository (special dropdown) +* Readme.md + * In root + * In subfolders From 79c1c4f2f91549123f2d842d10d9727b6a1ae87b Mon Sep 17 00:00:00 2001 From: jordanmccullough Date: Sat, 3 May 2014 10:14:19 -0600 Subject: [PATCH 12/12] Fine tune grammar --- workbooks/github-intermediate.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/workbooks/github-intermediate.md b/workbooks/github-intermediate.md index 0219e1df1..c0ca10e05 100644 --- a/workbooks/github-intermediate.md +++ b/workbooks/github-intermediate.md @@ -320,7 +320,7 @@ $ git log --stat -M $ git log --follow ``` -## Undoing commits +## Undoing commits with `revert` and `reset` ### Summary * Generating commit to restore past patch set @@ -376,7 +376,7 @@ $ git pop $ git stash --include-untracked ``` -## Recovering almost anything +## Recovering almost anything with `reflog` ### Summary * Tracing Git action "history" @@ -397,8 +397,8 @@ $ git branch [name] HEAD@{1} ## Pull requests ### Summary -* Pushing branch to repo -* Using GitHub interface +* Pushing a branch to GitHub +* Using the GitHub interface * Retrieving locally ```