threads / discuss / 25844

how to git with google code

Subject: how to git with google code

## tl;dr

7 messages between Nov 26, 2010 and Nov 28, 2010.

replies: 6people: 4as markdown or json

Bond· Nov 26, 2010, 14:20 UTC · lore

I am not clear with how do I host my code to git. Step1 )I have a folder named bond in that I have all my programs which I want to host on the link http://code.google.com/p/bond Step 2) git init Step 3) git add [B].[/B] After this what do I need to do?

Michael J Gruber· Nov 26, 2010, 15:12 UTC · re: Bond · lore

Re: how to git with google code

Bond venit, vidit, dixit 26.11.2010 15:20:
Show 7 quoted lines
> I am not clear with how do I host my code to git.
> Step1 )I have a folder named bond in that I have all my programs which
> I want to host on the link
> http://code.google.com/p/bond
> Step 2) git init
> Step 3) git add [B].[/B]
> After this what do I need to do?
You mean a la
http://code.google.com/p/support/wiki/ImportingFromGit
?
Bond· Nov 27, 2010, 02:50 UTC · re: Michael J Gruber · lore

Re: how to git with google code

On Fri, Nov 26, 2010 at 8:42 PM, Michael J Gruber <git@drmicha.warpmail.net> wrote:

>
> http://code.google.com/p/support/wiki/ImportingFromGit

Your link says "Naturally, your official source tree lives on some Git-capable server," which is not the case.I have it on my local machine and I never used git before.

Tay Ray Chuan· Nov 28, 2010, 04:27 UTC · re: Bond · lore

Re: how to git with google code

Hi,
On Sat, Nov 27, 2010 at 10:50 AM, Bond <jamesbond.2k.g@gmail.com> wrote:
Show 7 quoted lines
> On Fri, Nov 26, 2010 at 8:42 PM, Michael J Gruber
> <git@drmicha.warpmail.net> wrote:
>>
>> http://code.google.com/p/support/wiki/ImportingFromGit
> Your link says
> "Naturally, your official source tree lives on some Git-capable server,"
> which is not the case.I have it on my local machine and I never used git before.

You can take "official source tree" and "Git-capable server" to be your git repo that you git init-ed in your first post. But it's empty isn't it? So, just skip the "git fetch" step. That leaves:

  $ git svn clone ...
  $ cd trunk
Then go on from there.
-- 
Cheers,
Ray Chuan
Bond· Nov 28, 2010, 04:36 UTC · re: Tay Ray Chuan · lore

Re: how to git with google code

On Sun, Nov 28, 2010 at 9:57 AM, Tay Ray Chuan <rctay89@gmail.com> wrote:
Show 9 quoted lines
> Hi,
> You can take "official source tree" and "Git-capable server" to be
> your git repo that you git init-ed in your first post. But it's empty
> isn't it? So, just skip the "git fetch" step. That leaves:
>
>  $ git svn clone ...
>  $ cd trunk
>
> Then go on from there.
What do I do from that is what I asked in first post of this thread?
Tay Ray Chuan· Nov 28, 2010, 07:18 UTC · re: Bond · lore

Re: how to git with google code

On Sun, Nov 28, 2010 at 12:36 PM, Bond <jamesbond.2k.g@gmail.com> wrote:
Show 11 quoted lines
> On Sun, Nov 28, 2010 at 9:57 AM, Tay Ray Chuan <rctay89@gmail.com> wrote:
>> Hi,
>> You can take "official source tree" and "Git-capable server" to be
>> your git repo that you git init-ed in your first post. But it's empty
>> isn't it? So, just skip the "git fetch" step. That leaves:
>>
>>  $ git svn clone ...
>>  $ cd trunk
>>
>> Then go on from there.
> What do I do from that is what I asked in first post of this thread?
Assuming you did
  $ git svn clone http://svn.googlecode/url/to/your/repo

You'd have a git repo that is "linked" to the Google Code svn repo. Now go inside the git repo and do whatever you want. That was what I thought you were looking for in this thread.

But if you need advice on "how to do stuff in git", (eg. adding files, commit, push), just google for a git tutorial, I'm sure there are some pretty good ones out there.

-- 
Cheers,
Ray Chuan
Jan Krüger· Nov 26, 2010, 15:21 UTC · re: Bond · lore

Re: how to git with google code

--- Bond <jamesbond.2k.g@gmail.com> wrote:
> I am not clear with how do I host my code to git.

Google Code's project hosting does not officially support git. About the only thing you can do is to actually host a Subversion repository there and then access that via git-svn. However, that deprives you of many of the big advantages of git, such as useful merging and lightning-fast cloning (compared to Subversion via git-svn, anyway).

I would recommend that you look for a different hosting site. Other sites offering free git hosting for open source projects include Sourceforge, github, gitorious and repo.or.cz. Some of these provide you with instructions on how to push your code to them. In any case, I think you could benefit from reading a git tutorial or two.

Also, might I recommend that you create one repository per separate project you want to get hosted. It's bad organization to keep several projects in the same repository, and it's likely to bite you in the behind eventually.

HTH, Jan

← back to recent threads