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'
					
				

Git Learning Resources

Github

Who Uses Github

From 2013, jmduke
CompanyRepositoriesForksStarsLanguage
google85133612250C
adobe32386219231C++
twitter103605743780C++
paypal11410461868None
aws1816936221Java
yahoo14311294805JavaScript
linkedin5215017932Java
facebook1021531164907C++
dropbox191781329PHP
mozilla6871150044232C++

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

pages.github.com

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

Thanks

joshuajharris on


p.s. use slack
oduacm.slack.com

References