On Github rogeruiz / talks
We'll be going over:
How to configure Git on your machine
A base Git workflow that will get you started:
A Basic Terminal Window
Your hands
Your Keyboard
A pretty decent .gitconfig file
$ git config
usage: git config [options]
Config file location
--global use global config file
--system use system config file
--local use repository config file
-f, --file <file> use given config file
Action
--get get value: name [value-regex]
--get-all get all values: key [value-regex]
--get-regexp get values for regexp: name-regex [value-regex]
--replace-all replace all matching variables: name value [value_regex]
--add adds a new variable: name value
--unset removes a variable: name [value-regex]
--unset-all removes all matches: name [value-regex]
--rename-section rename section: old-name new-name
--remove-section remove a section: name
-l, --list list all
-e, --edit opens an editor
--get-color <slot> find the color configured: [default]
--get-colorbool <slot>
find the color setting: [stdout-is-tty]
Type
--bool value is "true" or "false"
--int value is decimal number
--bool-or-int value is --bool or --int
--path value is a path (file or directory name)
Other
-z, --null terminate values with NUL byte
--includes respect include directives on lookup
$ git config --global user. user.name -- full name used for commits
$ git config --global user. user.email -- email address used for commits
$ git config --global user. color.ui -- when to color if output is capable; most generic option, overriding by more specific ones
Your name and email address will be tied to each commit you do in Git
$ git log
commit d49ac57e4edf85d30b2c679437725edd05ffb2bf Author: Roger Steve Ruiz <roger.ruiz@rokkan.com> Date: Wed Sep 26 19:50:18 2012 -0400 Adding the thing that I removed commit a1e73b78ef6ec05599794e7cfd0b91bd7a10eb88 Author: Roger Steve Ruiz <roger.ruiz@rokkan.com> Date: Fri Sep 21 09:27:31 2012 -0400 Removing that thing that I added commit edb20515291544f847eab2691d554b5d19662c28 Author: Roger Steve Ruiz <roger.ruiz@rokkan.com> Date: Fri Sep 21 09:18:55 2012 -0400 Gangnam Style
Now with color.ui being active, you'll have colors!
$ git clone git@lamp.rokkan.com:Client-Project.git /a/random/folder/Client-Project
Seriously, wherever you want it.
I mean it.
Anywhere you want.
Just specify the path and the folder name.
$ git pull origin master
(i.e. Work)
$ git status
$ git add .
$ git commit -m "I have added a bunch of files to commit & I am committing all of them."
$ git pull origin master
$ git push origin master