Git & GitHub

Summary

Git

Git is a version control system used on the terminal, or command line, so developers can keep track of code changes on any given project. It also allows for collaboration. Instead of having to send code back and forth, like through email or FTP, developers can pull the latest version of a project and keep track of the revisions made to the code.

GitHub

GitHub is a development platform that uses git, where code for projects can be stored. Then other developers can others can easily view and access the code files. Other similar services include GitLab and BitBucket. I personally prefer GitHub because that's the platform I used to learn git. You can sign up for a free account if you don't already have one.

Documentation & Messages

When working with git and any service like GitHub be aware of ReadMe, Pull Requests, and Commit Messages.

Local, Remote, and Origin

Resources I've Found Helpful

Cheat Sheet

How to set up a GitHub Repo

touch ReadME.md
git init
git add ReadME.md
git commit -m "first commit"
git remote add origin [github_repo_url]
git push -u origin master

Add changed files

git status
git add [name_of_file]

Output the branch you are on

git branch | grep \*

Output the remote

git config --get remote.origin.url

Git & GitHub Projects

Contribute to this website

You will need a basic understanding of handlebars, sass, and/or markdown. Go to this repository, or repo, on GitHub and contribute to it. Fork the repo, clone it, and add something you've learned about web development ot the bottom of the ReadME.md. Or, if there are any issues in the Issue tab, comment that you will be working on one, and start tackling the issue.

Create your own repo or contribute to Open Source

Create a repo for a project you are interested in starting, such as a personal website. Create a ReadME for the repo with some documentation, and try to make small, well documented commits. If you would rather contribute to an existing repo, check out the following links to find an Open Source project you are interested in.