This screencast covers:
git clone <repository address goes here>Creates a local copy of the repositorygit statusTells you which files have changedgit status -sA "short" version ofgit statusthat is more concise
git logShows the log of commits with their messages, dates and usersgit add <file name goes here>Adds a file or directory to the set of changes that will be applied when you commitgit commit -m "<Your message goes here>"Commits the changes you have added so far to your local repository (on your computer)git commit -m "<Your message goes here>" -aThe-aoption automatically adds all modified files. This is equivalent to first invokinggit addfor each changed file, then committing.
git pushPushes your local commits to GitHub, making GitHub contain the same changed files that are on your computergit push origin masterThe full form ofgit pushthat is assumed.originrefers to GitHub, andmasterrefers to the master branch (the default main branch that is automatically created with the repository).
git pullPulls the remote changes from GitHub down to your computer. Shorthand forgit fetchgets the changes from GitHub to your computer, but does not change the files you seegit merge origin/mastermerges the remote changes into the files you see
git branchLists branches and shows the currently checked out branchgit branch <new branch name>Creates a new branchgit branch -d <new branch name>Deletes a branch
git checkout <branch name goes here>Checks out a branchgit checkout -b <new branch name>Creates and checks out a branch
- Make a new branch called
gh-pagesusing either of the following:git branch gh-pages; git checkout gh-pagesgit checkout -b gh-pages
- Push the
gh-pagesbranch to GitHub using:git push origin gh-pages
- Access the page at
http://<user name>.github.io/<repository name>/
Below are links to specific times in the video that explain each step.
- Creating a new repository in GitHub
- Install Git on your system
- Setting up SSH keys (you don't need to do this if you use the HTTPs protocol rather than SSH, but with HTTPS you'll need to enter your user name and password each time you push)
- Cloning a repository
- Using git status
- Using git add
- Committing files
- Configuring your user name and email with Git
- Pushing changes to GitHub
- GitHub Pages
- Creating the gh-pages branch
- Checking out the gh-pages branch
- Pushing the gh-pages branch to GitHub
- Adding an index.html file
- Updating index.html and adding a JavaScript file (full Git workflow cycle)
Mind Blown Gif used in video.
Curran Kelleher, 9/9/2014