-
create/log-into your http://github.com account
-
create/log-into your http://c9.io account, using your github account credentials
-
from your C9 dashboard, create a new workspace, name it "intro-to-git", leave all other options at default values, then "Create workspace"
-
in github, create a "New repository" that is also named "intro-to-git"
-
walk through the new github project page, plus these additional commands:
```
echo "# intro-to-git" >> README.md // click gear/settings for file tree; show hidden files ```
```
git init
// explore .git
// open config
git status
git add readme.md
```
```
git add README.md
git status
git log
```
```
git commit -m "first commit"
git status
git log
```
```
git remote add origin https://github.com/SLC-JS-Learners/intro-to-git.git // USE YOUR REPO'S URL
// open config & review "[remote "origin"]" section; http://www.gitguys.com/topics/the-configuration-file-remote-section/
// close config file & re-hide hidden files
```
```
git push -u origin master
// review "[branch "master"]" section in config; http://stackoverflow.com/a/5561327/4285306
// refresh github repo
```
-
git branch -a
-
git checkout -b awesome-new-feature
// checkout; -b; branch-name -
git branch -a
// terminal info -
git status
-
c9 open README.md
-
edit your README.md file ; http://www.patorjk.com/software/taag/#p=display&f=Big&t=SLC-JS-Learners; ensure there is a tab, or three spaces, in front of each line ;-)
-
cmd-s
-
git commit
-
git status
-
git add README.md
-
git status
-
git commit
-
update message & description
-
ctrl-o; enter; ctrl-x
-
git log
-
q
-
refresh github
-
git push origin master
// refresh github; check branches -
git push
-
git push --set-upstream origin awesome-new-feature
-
review README.md
-
git checkout master
-
review README.md
-
git branch -a
-
git status
-
git diff awesome-new-feature
-
git diff master awesome-new-feature README.md
-
git merge awesome-new-feature
-
git status
-
git push
-
refresh github; review branches
-
git branch -a
-
git branch -d awesome-new-feature
-
git push
// refresh github; check branches -
git push origin --delete awesome-new-feature
// refresh github; check branches -
git checkout -b even-more-awesome-new-feature
-
edit and save your README.md
-
git add README.md
-
git commit -m "even-more-awesome-new-feature README.md updated"
-
git push
-
git push --set-upstream origin even-more-awesome-new-feature
-
refresh and review in github
-
edit and save your README.md one more time
-
git add README.md
-
git commit -m "even-more-awesome-new-feature README.md updated yet again"
// xkcd's Git Commit -
git push
-
git log
-
q
-
git checkout master
-
git merge even-more-awesome-new-feature
-
git push origin --delete even-more-awesome-new-feature
// remote & remote ref deletions -
refresh github & review branches
-
git branch -d even-more-awesome-new-feature
// local deletion -
git branch -a
- close a tab in C9 ==> alt-w
- switch from editor to terminal ==> cmd-t
- NANO ==> ctrl-o to save; ctrl-x to exit (letter 'o'; http://www.howtogeek.com/howto/42980/the-beginners-guide-to-nano-the-linux-command-line-text-editor/)
- open file to edit ==>
c9 open <filename>
- set EDITOR="c9 open" to edit your commit messages in Cloud9
- http://gitlab.com/ - GitLab (alternative to github)
- https://bitbucket.org/ - BitBucket
- http://www.git-scm.com/book/en/v2 - definitive book
- http://www.git-scm.com/docs/ - by command
- ndpsoftware.com/git-cheatsheet.html - interactive git cheatsheet
- https://training.github.com/kit/downloads/github-git-cheat-sheet.pdf - printable cheatsheet
- http://gitready.com/ - "learn git one commit at a time"
- http://stackoverflow.com/a/23961231/4285306 - best coverage about deletion of remote and local branches that I've found
- http://stackoverflow.com/a/9834872/4285306 - a bit more about comparing branches/tags/commits
- http://www.gitguys.com/table-of-contents/ - the Git Guys
- https://github.com/petervanderdoes/gitflow - active GitFlow extension
- http://jlord.us/git-it/ / https://github.com/jlord/git-it - free
- http://githowto.com/ - free
- https://www.codeschool.com/paths/git - free and $$