I haven't used SVN or other system before so don't exactly know how they work but for git the basic things you do is:
Start a Project
initiate the git for it
write your code
add those files to git
Write comment for 'this' commit
and the changes are deposited on local/'your development machine'. Now you have to 'push' those changes to another repository i.e. another server in case you are doing it on multiple machines
Installation of git on Ubuntu (9.04):
It can be done through 'apt-get install git-core' but that installs the older version. The current version is 126.96.36.199. So download it and install as described below:
1. Download git from http://kernel.org/pub/
2. Unzip the above download
3. cd to unziped directory
Will probably happen successfully :)
5. then do
sudo makeThis should o/p the lines below :)
This shows everything is okay,
if that is not the O/p follow the suggestion given by the installation script might be something is missing probably, xlib1g-dev, do it as below
sudo apt-get install zlib1g-devAnd redo
6. then do
sudo make install
Some thing like
INSTALL 644 tclIndex
INSTALL 644 about.tcl
INSTALL 644 blame.tcl
INSTALL 644 branch_checkout.tcl
INSTALL 644 branch_create.tcl
INSTALL 644 branch_delete.tcl
INSTALL 644 branch_rename.tcl
INSTALL 644 branch.tcl
INSTALL 644 browser.tcl
INSTALL 644 checkout_op.tcl
INSTALL 644 choose_font.tcl
INSTALL 644 choose_repository.tcl
INSTALL 644 choose_rev.tcl
shows you have to relax now, git is successfully being installed..
And that's it.
1) Now create a project or go to your project directory Ex. mkdir newpro and CD newpro and write your file now or those might already be present if it's old project
2) do initiate the git for it by git init
3) add all the files from project to git i.e. by git add .
4) and now commit the changes or in new project case initial commit by git commit
you will be taken to a file where you can enter a comment so that you remember what was the reason for commit, like in this case we can say "Initial commit"
Then our git repository is perfectly ready.
Now you are free to do changes to your files and save them as we usually do.
Now add the changed files to git by
git add nameofchnagedfile
and then commit
other typical uses are well documented here: http://www.spheredev.org/wiki/
To do it on different machines say m1 and m2, first we install git on both machines. Say m1 is central repository and initially our project is there, what we do is initiate git for that project (on m1) and get a clone of it as below (described here: http://danielmiessler.com/
git add .
and then come out of our directory i.e
and then clone it
git clone newpro/ newpro.git
so the repository clone is ready on m1
now let's go to m2 and get the clone there and work on it and as you do changes push them to m1 and pull the recent code from the same. Haven't tried this yet, will post it times later.