Git is a version control tool, that allows users to take a snapshot in time of their code. This tool gives users the opportunity to roll back changes or to go back to previous snapshots.
The Git workflow steps include:
git init
- only used once, initialized INSIDE the folder to trackgit status
- can be used at any time, shows you the status of your trackinggit add file_name.txt
- adds a file to be tracked to staginggit commit -m 'Intitial commit'
- takes a snapshot, should be named differently with each commit, start with caps, use imperative present tensegit diff file_name.txt
- shows you the changes to the file
GitHub is a code repository service that allows many users to work collaboratively on a project. It allows users to work share code between collaborators and computers. Users can pull (download) or push (code) to the platform. Code changes can be recommeneded and accepted or rejected. Code review is another benefit of the platform. Repos can be forked, cloned, or forked and then cloned.
The GitHub workflow steps include:
- Fork
- Clone
- git clone github_url
- git push
- reload browser
Important reminder
- No git init is required for forked repositories
Alternatives to GitHub
- Mercurial
- Subversion (aka SVN)
Companies Who Use GitHub
- Amazon
- Netflix
- AirBNB