permanent daylight
the obsessions of Adam Findley

Git Remote Repository (Similar to a typical SVN repo)

Posted by adam on Tue Apr 1 2008 4:54 p.m.

So I've transitioned over to using git from svn as my source code management (SCM) tool, and I truly love it. git was created by Linus Torvalds, creator of Linux. It was Linus's Tech Talk at Google and my friend Andrew's persuasive arguments that put me over the edge and got me really going on it.

So now that I'm using the best SCM tool yet, there are a few SVN behaviors I need to replicate. An important one is being able to push my changes to a server that I can then pull down to whichever machine I am at. I have looked around online and found a mostly handy guide on creating setting up a new remote repository but it wasn't quite what I was looking for. So in the nature of Free/Libre/Open Source Software (FLOSS) culture, I decided to create a guide myself. I hope the below helps:

This first part is for those who are setting up a fresh new git repository:

mkdir my_git_repo
cd my_git_repo
git init
touch temp.txt
git add .
git commit -m "initial commit"
git clone --bare ../my_git_repo.git

Create a working directory:

git clone my_git_repo.git

Typical coding behavior

# Start of coding
git pull

# Sometimes while coding
git add *some files*
git commit -m "Commit message"

# End of coding
git push

Some sites that have helped:

Comments

smallfootnine at Wed Dec 23 2009 4:24 p.m.

I like this site content, it is very cute. this

smallfootseven at Thu Dec 24 2009 7:34 a.m.

I like this site topic, it's definitely cute. here

Post your Comment

*

*

*

HTML is not allowed, but markdown is. URLs are automatically converted to links, but not followed.