Sharing code, no email
Work with better programmers
Get noticed
Use GitHub without using GitHub
Alice and Bob are working together on a project.
They each have a copy of the project on their computers.
Alice makes a couple changes to her copy
Bob makes a change to his copy
How will these changes come together?
Git allows different people to work on a project separately and then, some time
later, bring all of the changes together.
Made a bad change and need to revert back to a known good state
Want to see diff between versions
Want to see how long a bug has existed
Experiment without breaking working code
Tracking changes is what Git does
Stores changes
Delete it, no more git
Universal Git API
Start on local machine, push to GitHub when you need to collaborate
Think of it like a project
Limited in scope
Snapshot
Can look at differences
Contain:
Commit ref
Author name / email
Commiter name / email
Date & time
Message
Each commit should tell a coherent story
Commit messages are important
Each commit should have a message explaining
One file at a time, or multiple related files at once
![Merge branch 'asdfasjkfdlas/alkdjf' into sdkjfls-final]
(http://imgs.xkcd.com/comics/git_commit.png)
Can roll back to a specific point in time later
Can see when a change was introduced
Start work on new branch
MASTER should be production
Eclipse plugin
GitHub for Desktop
Compromise between ease of web interface and power of command line
Hosted Repositories
Students can have up to five free private repos
Can have one contributor, or many contributors
Built in Issue Tracker
Issues =/= Bad
@mentions
Anyone can comment on an issue
Subscribe button
Notifications
Closed issues are saved in history forever
Pull Request is a special kind of issue
Can edit files (and commit changes) directly in the web interface
Fork
Create your own copy
Do whatever you like
Changeset container
Forks are good!
Pull Request
Special kind of issue with changes attached
After you have made useful changes
Offer your changes back to the origin
![There are probably children out there holding down spacebar to stay warm in
the winter! YOUR UPDATE MURDERS CHILDREN.]
(http://imgs.xkcd.com/comics/workflow.png)
Every Repo has it's own website
gh-pages
branch
Users can have their own static website hosted by GitHub
Getting Started with GitHub
Create an account
Fill out profile
Test Repo
Initialize with Readme
Edit Readme
Look ma, no downloads!
Find a repository you'd like to contribute to
Read project's Contributing.txt
to learn how to be a good citizen
Fork project repo to create your own copy
Create a new branch in your fork that will hold the changes for this feature
Commit your changes to this branch to add a feature or fix a bug
Submit a Pull Request to announce your changes, offering them back to the origin
In the message of the Pull Request, be sure to explain exactly what your changes do
This will usually spark a conversation around the Pull Request
You may be asked to add something to your pull request
Just push more commits to your branch
Once pull request has been accepted/rejected, you may delete your branch
Probably a good idea not to delete your Fork , however
...profit?
Each Gist is actually a Git repo
Keeps a full revision history
Can be cloned & forked
Can be "upgraded" to a GitHub repository later
Ignore generated files
.exe
.class
.o
Config files
Ignore large files that can be found elsewhere
HEAD, master, detached head
Configure command line client