Skip to content

Instantly share code, notes, and snippets.

@mattions
Created April 19, 2012 14:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattions/2421351 to your computer and use it in GitHub Desktop.
Save mattions/2421351 to your computer and use it in GitHub Desktop.
Temporary gist for git crash course

================= Git: Crash course

How git is controlled

General config file

~/.gitconfig : Usually holds your name and email address

[user]
	email = thisisf@ke.com
	name = Michele Mattioni

And different customizations, like alias:

[alias]
	st = status
	ci = commit
	co = checkout

git co == git checkout (saving 6 chrs) git ci == git commit (saving 4 chrs) git st == git status (saving 4 chrs)

Project based config files

  • repo/.gitconfig --> Holds the structure of the repo and branches
  • repo/.gitignore --> Ignore file which you don't wont to add to the project (*.pyc, *.class, ..)

What's gonna happen

Resources

Working offline

  • Create a repo git init
  • Commit, add, log, GUI git ci, git add, git log, gitg
  • Intro to branches git co -b
  • 3 ways merge git mergetool

Going online

  • Exportng the repo to github git push
  • Push/Pull system git pull
  • Forking someone else repo handy github button

Making your life easier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment