GIT Distributed Version Control 2

Posted by John Mon, 12 May 2008 21:59:00 GMT

Get with,

sudo aptitude install git-core

Simple Commands,

git init                   ...init repository
git add .                  ...add everything in dir to repository
git commit -a -m 'update'  ...add + commit changes
git diff                   ...show changes since last commit

git add [file]             ...add file
git rm [file]              ...remove file
git mv [file]              ...move file

Mirror Git Repository

rsync -azvCL --delete --progress 
   -e "ssh -i /home/[user]/.ssh/[mykey]" .git/* 
[user]@[user].strongspace.com:/home/[user]/[project]/.git/
Trackbacks

Use the following link to trackback from your own site:
http://www.red91.com/trackbacks?article_id=git-distributed-version-control&day=12&month=05&year=2008

Comments

Leave a response

  1. Avatar
    gitster 15 days later:

    Your explanation for “git checkout [path]” is a bit questionable.

    For list of “small set of commands to get you started”, I’d drop “git status” and substitute it with “git diff” if I were you.

    Anyway, have fun with git.

  2. Avatar
    John 16 days later:

    thanks, it was just a quick post of commands to get me started. to be honest i haven’t had a need to use git checkout yet but will update to suit.

    git’s really shocking me with how fast and intelligent it is, much better than svn for small isolated stuff.

Comments