|
| 1 | +--- |
| 2 | +layout: bare |
| 3 | +title: NC State Public Workshop Nov 2013 |
| 4 | +description: NC State Public Workshop Nov 2013 Class Notes |
| 5 | +tags: [notes] |
| 6 | +path: classnotes/2013-11-19-nc-state-public-workshop-nov-2013.md |
| 7 | +eventdate: 2013-11-19 |
| 8 | +--- |
| 9 | + |
| 10 | +## Teachers |
| 11 | +* Tim Berglund ([Twitter](http://twitter.com/tlberglund), [GitHub](https://github.com/tlberglund)) |
| 12 | + |
| 13 | +## Resources |
| 14 | + |
| 15 | +* [Adding SSL Certificates for GitHub.com (Common for Windows XP)](http://stackoverflow.com/questions/3777075/https-github-access/4454754#4454754) |
| 16 | +* Disabling SSL Certificate Checks for Git: |
| 17 | + |
| 18 | + git config --global http.sslVerify false |
| 19 | +* [Open Source Git Ignore Templates](https://github.com/github/gitignore) |
| 20 | +* [Book Authoring on Git and GitHub](http://teach.github.com/articles/book-authoring-using-git-and-github/) |
| 21 | +* [Post Receive Hooks](https://help.github.com/articles/post-receive-hooks) |
| 22 | +* [GitHub Training Videos](http://training.github.com/resources/videos/) |
| 23 | +* [Using Git with Media Temple](http://carl-topham.com/theblog/post/using-git-media-temple/) |
| 24 | +* [GitHub Training Feedback and Follow-up Questions](https://github.com/githubtraining/feedback/issues?state=open) |
| 25 | +* [GitHub Commit Status API for Continuous Integration](https://github.com/blog/1227-commit-status-api) |
| 26 | +* [Git Credential Cache for HTTP](http://teach.github.com/articles/lesson-git-credential-cache/) |
| 27 | +* [GitHub Issues Cheatsheet](http://teach.github.com/articles/github-issues-cheatsheet/) |
| 28 | +* [Jenkins Git Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin) |
| 29 | +* [Open Source Git Ignores](https://github.com/github/gitignore) |
| 30 | +* [Ship of Theseus - Related to Similarity Index](http://en.wikipedia.org/wiki/Ship_of_Theseus) |
| 31 | +* [git-p4 Perforce Script](http://answers.perforce.com/articles/KB_Article/Git-P4) |
| 32 | +* [Unix watch command](http://en.wikipedia.org/wiki/Watch_(Unix\)) |
| 33 | +* [SHA-1 Hash Collisions](http://git-scm.com/book/ch6-1.html#A-SHORT-NOTE-ABOUT-SHA-1) |
| 34 | +* [NPD Git Cheatsheet](http://ndpsoftware.com/git-cheatsheet.html) |
| 35 | +* [More Git Cheatsheets](http://teach.github.com/articles/git-cheatsheets/) |
| 36 | + |
| 37 | +## Installation |
| 38 | +* Git Installation |
| 39 | + * [The Git-SCM Web Site (All Platforms)](http://git-scm.com) |
| 40 | + * [The GitHub for Windows Client and Command Line](http://windows.github.com) |
| 41 | +* Minimum is 1.7.ANYTHING, but can have issues with HTTPS credential prompting. |
| 42 | +* Best is 1.8.0 or higher |
| 43 | + |
| 44 | +## Suggested Books, Articles |
| 45 | +* [Free ProGit Book](http://git-scm.com/book) |
| 46 | +* [Getting started with Version Control](http://teach.github.com/articles/lesson-new-to-version-control/) |
| 47 | +* [The GitHub Flow](http://scottchacon.com/2011/08/31/github-flow.html) |
| 48 | +* [DVCS Workflows Book](https://github.com/zkessin/dvcs-workflows) |
| 49 | +* [Git Cheat Sheets](http://teach.github.com/articles/git-cheatsheets/) |
| 50 | +* [Git Workflow Links](https://pinboard.in/u:matthew.mccullough/t:git+workflow) |
| 51 | + |
| 52 | +## Course Materials, Links |
| 53 | +* [Git Teaching Materials](http://teach.github.com) |
| 54 | +* [Course Slides](http://teach.github.com/presentations/) |
| 55 | +* [Course Slides Source](https://github.com/github/teach.github.com/tree/gh-pages/presentations) |
| 56 | +* [Post-event Git and GitHub questions](https://github.com/githubtraining/feedback/) |
| 57 | +* [Free Office Hours Sessions](http://training.github.com/web/free-classes/) |
| 58 | + |
| 59 | +## Outline |
| 60 | + |
| 61 | +* Convert an existing project to a Git Repository |
| 62 | +* Track changes to your project |
| 63 | +* Protect your work from experimental changes through branching |
| 64 | +* Push code to repositories on GitHub |
| 65 | +* Collaborate with colleagues through Pull Requests |
| 66 | +* Best Pratices for teams |
| 67 | +* Reset and reflog |
| 68 | + |
| 69 | + |
| 70 | +## Command History |
| 71 | + |
| 72 | + git --version |
| 73 | + mkdir project |
| 74 | + vi raven.txt |
| 75 | + git init . |
| 76 | + git config user.name |
| 77 | + git config user.email |
| 78 | + git config --global user.name "Tim Berglund" |
| 79 | + git config --global user.email "tlberglund@github.com" |
| 80 | + git config --global color.ui auto |
| 81 | + git commit -m "Initial commit" |
| 82 | + git commit -m "Borrowed books" |
| 83 | + git help log |
| 84 | + git log --format=raw |
| 85 | + git log --graph |
| 86 | + git log --graph --decorate |
| 87 | + git log --graph --decorate --oneline |
| 88 | + git log --graph --decorate --oneline --all |
| 89 | + pwd |
| 90 | + git loglive |
| 91 | + git branch feature |
| 92 | + git commit -m "Rare and radiant" |
| 93 | + git checkout feature |
| 94 | + git commit -m "Title" |
| 95 | + git commit -m "Forgotten lore" |
| 96 | + git checkout master |
| 97 | + git merge feature -m "Merged" |
| 98 | + git branch -d feature |
| 99 | + history |
| 100 | + git config --global alias.lol "log --graph --decorate --oneline --all" |
| 101 | + git config --local --list |
| 102 | + git config --global --list |
| 103 | + vi ~/.gitconfig |
| 104 | + git commit -m "Taping" |
| 105 | + git commit --amend |
| 106 | + ls -la |
| 107 | + git remote add origin https://github.com/githubteacher/nc-state.git |
| 108 | + git remote |
| 109 | + git remote -v |
| 110 | + git push --set-upstream origin master |
| 111 | + git log |
| 112 | + git branch |
| 113 | + git branch -r |
| 114 | + git branch -a |
| 115 | + git commit -m "Gentle rapping" |
| 116 | + git config --global push.default simple |
| 117 | + git commit -m "Purple curtains" |
| 118 | + git fetch |
| 119 | + git config --global credential.helper cache |
| 120 | + git config --global --unset credential.helper |
| 121 | + tr.git |
| 122 | + export PS1="$ " |
| 123 | + cd scratch |
| 124 | + ll |
| 125 | + cd project |
| 126 | + cd .. |
| 127 | + git clone https://github.com/githubstudent/nc-state.git |
| 128 | + cd nc-state |
| 129 | + ls |
| 130 | + git commit -m "Terrors" |
| 131 | + git commit -m "Trying to chill" |
| 132 | + git loglive -15 |
| 133 | + git loglive -13 |
| 134 | + gcc gowolfpack.c |
| 135 | + sudo gcc gowolfpack.c |
| 136 | + git pull https://github.com/githubstudent/nc-state.git master |
| 137 | + git status |
| 138 | + git add raven.txt |
| 139 | + git commit -m "Merged PR" |
| 140 | + git loglive -12 |
| 141 | + git pull |
| 142 | + git lol |
| 143 | + git remote add teacher https://github.com/githubteacher/nc-state.git |
| 144 | + git pull teacher master |
| 145 | + git push |
| 146 | + git commit -m "Late visitor" |
| 147 | + git reset --hard 5c82 |
| 148 | + cat raven.txt |
| 149 | + git reflog |
| 150 | + git reset --hard ad69f6f |
| 151 | + vi raven.txt |
| 152 | + git add . |
| 153 | + git commit -m "Fixed late visitor" |
| 154 | + |
0 commit comments