Slide 1

Slide 1 text

GIT AND GITHUB Ben Nicholas Friday, March 16, 12

Slide 2

Slide 2 text

Git Distributed version control system Easy branching Staged commits Friday, March 16, 12

Slide 3

Slide 3 text

Staging area 3 different stages Working directory Index/Staging area Repository(as commits) Friday, March 16, 12

Slide 4

Slide 4 text

Remotes Repository being served by another computer Named, typically “origin” Push and pull trade changes around Friday, March 16, 12

Slide 5

Slide 5 text

Important commands git status -see what changes are in git add - add file to index git commit - create a commit from the index git pull - get commits from a remote repository git push - send commits to a remote repository git clone - Pull a remote repository into a new repository Friday, March 16, 12

Slide 6

Slide 6 text

Other Commands git stash save - Push a commit into the stash git stash apply - Pop a commit into the working directory git log - see a list of commits git reset --hard head - discard all changes/go back to last commit git merge - combine two branches into one git checkout -b - create a new branch and switch to it Friday, March 16, 12

Slide 7

Slide 7 text

Github Git hosting Pure awesome Forks and Pull Requests Friday, March 16, 12

Slide 8

Slide 8 text

Forks A person’s copy of a repository Created with Hardcore Forking Action! Friday, March 16, 12

Slide 9

Slide 9 text

Pull Requests Ask the repo’s owner to take your changes Resolved by the main repo pulling from your repo Sent between forks of a project Friday, March 16, 12

Slide 10

Slide 10 text

Our project layout rit-sse/RapDevXI is the main repo [your username]/RapDevXI for each individual game Friday, March 16, 12

Slide 11

Slide 11 text

Making a new game Get a group of people Fork rit-sse/RapDevXI Clone [your username]/RapDevXI Write on your Game Go to your fork on github Click Pull Request - one of the admin’s will apply it Friday, March 16, 12

Slide 12

Slide 12 text

Questions? reflog! actual repository layout! merging unrelated repos! rewriting history! changing branch history! reordering commits! Friday, March 16, 12