読者です 読者をやめる 読者になる 読者になる

Trying git

Prequisites

Basic knowledge about distributed version control systems. Experience of Mercurial will help.

Installation at Macports environment

$ sudo port -v selfupdate
$ sudo port install git-core

Manual

see git(1). or see とても優しいGitHubの使い方

$ man gittutorial

Basic usage as classic VCS

$ mkdir hoge
$ cd hoge
$ git init
$ echo hogehoge > hogehoge.txt
$ git add hogehoge.txt
$ EDITOR=emacs git commit
$ git diff

Basic usage as distribute VCS

$ git ...

Using github

  1. create account
  2. submit publickey (.ssh/id_rsa.pub)
  git config --global user.name "UENISHI Kota"
  git config --global user.email kuenishi+github@gmail.com

  mkdir gen_paxos
  cd gen_paxos
  git init
  touch README
  git add README
  git commit -m 'first commit'
  git remote add origin git@github.com:kuenishi/gen_paxos.git
  git push origin master

syntax of 'remote add origin' and 'push origin master' seems strange, different from mercurial.