TOP


Home

setup

  • only once on any given computer

git config

  • get and set configuration variables
files
filedesc.git config option
/etc/gitconfig filevalues for every user on the system and all their repositories.--system
/.gitconfig
/.config/git/config file
Specific to your user--global
config file in the Git directory (that is, .git/config) of whatever repository you’re currently usingsingle repository.

ID

$ git config --global user.name "foo bar"
$ git config --global user.email foo.bar@example.com

list

git config --list
  • Git uses the last value for each unique key it sees.
to get the value of the specific key
$ git config user.name

help

$ git help config

Getting a Git Repository

Initializing a Repository in an Existing Directory

$ git init
    • This creates a new subdirectory named .git

start version-controlling existing files

$ git add *.c
$ git add LICENSE
$ git commit -m 'initial project version'

tips

get git using git

git clone git://git.kernel.org/pub/scm/git/git.git

管理人/副管理人のみ編集できます