GIT WHAT?

INTRO TO THE WONDERFUL WORLD OF VERSION CONTROL.

Chris DeMars | @saltnburnem

ABOUT ME

git !== github

version control?

Centralized 

http://http://git-scm.com/

DIstributed 

http://http://git-scm.com/

Examples

What is git?

What it is not...

Not...Dropbox

Not...subversion

not...google drive

Git is software that, in a way acts as a mini file system and stores snapshots of files for versioning, not the actual files themselves.

who made this sweet thing called git?

Local repo

git init

This initializes the repo in your folder or directory in order to start versioning the files that you have in that directory.

what is github?

GitHub is a web-based Git repository hosting service, which offers all of the distributed revision control and source code management (SCM) functionality of Git as well as adding its own features.

From Wikipedia...

remote repo

watch, star, fork

clone

Issues

pull request

terminal

common commands

  • cd..........change directory
  • cd.. .......change directory one level up
  • ls..........list files
  • ls -a.......show all files
  • pwd.........print working directory
  • touch.......create file
  • mkdir.......make a directory or create a folder
  • rm -r.......remove recursively

git bash for windows

Shell that you can run git commands in and functions like a Linux terminal

http://git-scm.com/downloads

common git commands

  • git init....................initialize repo
  • git add...................add files to be staged and tracked
  • git commit -m.......commit files with message
  • git status...............check what you are doing
  • git push.................push to remote repo i.e. GitHub
  • git pull...................pull down remote repo to your local
  • git log...................check the commit, time, date, and diff

git status all the things!!!!!!!

staging vs. committing

branches

what is a branch

A branch is a separate off shoot of master, the main branch, that you can play with and not mess up the master branch.

http://robey.lag.net/

!!!!craisins!!!!

what's it for?

Branches are used for bug fixes, and features that eventually will get merged into master after the code has been reviewed and or tested.

Create new branch

Checkout new branch

reset

Essentially reset un-stages files that are in the index or staging area.

fun

starts

now

install git

http://git-scm.com/downloads

git config

http://gitimmersion.com/lab_01.html

gui clients

setup github page

all repos

git push

This command tells git to push all the things to your committed code out to the remote repo.

git pull

This command tells git to pull all the newest code out of the remote repo and place in your local, to continue to be worked on.

git ignore

Gitignore is a file created to ignore files you don't want to push remotely.

demo time

git is...

  • Fast
  • Distributed
  • Powerful
  • IMO the best VCS

future events

April 14th @ Atomic Object in Ann Arbor

resources

Git

Thank you!!

cdemars86@gmail.com

@saltnburnem

thischriscreative.com

Git What?

By Chris DeMars

Git What?

Intro to git and GitHub for Refresh Detroit talk.

  • 1,288