Setting up git
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4122
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
Struggled with figuring out how to set up git.

Update: READ THIS FIRST!! This guy explains why git and svn are not the same, and why git should not be thought of as an 'upgraded' svn, it is not, it is a totally different thing, git does not replace svn, it's a different feature set and functionality and purpose. Don't follow the fads, use the ones that is right for you.
:: Quote ::
I think a big part of this is due to many people coming to Git from a conceptually simpler VCS ó probably Subversion ó and trying to apply their past knowledge to Git. Itís easy to understand why people want to do this. Take Subversion, for example. Subversion is simple, right? Itís just files and folders. Commits are numbered sequentially. Even branching and tagging is simple ó itís just like taking a backup of a folder.

Basically, Subversion fits in nicely with our existing computing paradigms. Everybody understands files and folders. Everybody knows that revision #10 was the one after #9 and before #11. But these paradigms break down when you try to apply them to Gitís advanced features.

Thatís why trying to understand Git in this way is wrong. Git doesnít work like Subversion at all. Which is pretty confusing, right? You can add and remove files. You can commit your changes. You can generate diffs and patches which look just like Subversionís. How can something which appears so similar really be so different?

First, after your read the above:

install git, then:

create git config file by running these commands:

git init

then create your config file by these commands:

$ git config --global "John Doe"
$ git config --global
$ git config --global core.editor nano

check your settings: git config --list
git add *.c
$ git add README
$ git commit -m 'initial project version'

and as this thread notes:

git remote add origin [path to project, let us say it's google code]
git remote add origin

say your email address for googlecode is then that would be:
git remote add origin

If you screw up the path to the project, or get something else wrong, then do this:

git remote set-url origin git://
git push origin master

which will ask you for your password, I'm sure there is a way to store that too.

To make your logins sticky, do this, in $HOME/.netrc create this:

Add the following to your .netrc
machine login password [generated password]

like so:
machine login ARR45fdesW2

save it, then git will use that. It seems to work, I tested it.
Back to top
Display posts from previous:   

All times are GMT - 8 Hours