Github
How to use git, github, and gh-pages
by
joshuajharris
/ ODU ACM Secretary
Welcome
Git
History of Git
Install Git
Windows
If you use chocolatey run
choco install git.install
or
install git bash
Linux
Install "git" via your package manager
Example: Ubuntu
sudo apt-get install git
Mac OSX installed by default
Quick Check (Mac & Linux)
git --version
Windows: check if git bash is installed
Git Basics
Inside of your project directory, type
git init
Git Basics cont...
Check status, Add a file
git status
git add test.js
Git Basics cont...
Commit
git commit -m 'Added a super awesome test file'
Branches
Branches example
git branch testing
Branches Cont...
git checkout testing
vim test.rb
git commit -a -m 'made a change'
git checkout master
vim test.rb
git commit -a -m 'made other changes'
Github
Who Uses Github
From 2013, jmduke
Company | Repositories | Forks | Stars | Language |
google | 85 | 1336 | 12250 | C |
adobe | 32 | 3862 | 19231 | C++ |
twitter | 103 | 6057 | 43780 | C++ |
paypal | 114 | 1046 | 1868 | None |
aws | 18 | 1693 | 6221 | Java |
yahoo | 143 | 1129 | 4805 | JavaScript |
linkedin | 52 | 1501 | 7932 | Java |
facebook | 102 | 15311 | 64907 | C++ |
dropbox | 19 | 178 | 1329 | PHP |
mozilla | 687 | 11500 | 44232 | C++ |
Github Keywords
- repo: Repository, storage space for your project
- fork: a copy of a repository
- issues: way to keep track of bugs, tasks, and enhancements
- review: high-level overview of what exactly has changed between your branch
- pull request: let you tell others about changes you've pushed to a repository on GitHub
How to push content
git remote add origin [email protected]:yourusername/repo-name.git
git push origin branch-name
Contributing
- The biggest reason for github
- Employers love to see it
- Great way to learn, get noticed?
Contributing How To
- Look for a smaller project
- Project you are interested in
- Check out the issues tab for small tasks you can accomplish
How To Get other to Contribute
- Add Collaborators
- Have good documentation
- Make good issues
gh-pages how to
create new repo named yourusername.github.io
gh-pages how to cont...
Now push content to the repo in static files like .html, .js, .css
and go to yourusername.github.io in your browser
Project pages
Pick a template