1

I would like to upload my web directory to google code for a project.

What is the terminal command that I would use to upload my directory to google code?

5
  • What do you mean? Do you already have a project created on Google Code? Commented May 7, 2012 at 3:55
  • yes ... project-fillini ... i want to upload my local drive website to my google code hosting directory ... i am looking for the git code to do this and am having trouble ... Commented May 7, 2012 at 4:17
  • am i stupid to ask this? Commented May 7, 2012 at 4:17
  • Do you currently have the code on your machine in a local git repo? Commented May 7, 2012 at 4:22
  • i have them in ReturnOfChrist.git on my local drive ... Commented May 7, 2012 at 4:41

1 Answer 1

2

Simply add your ggogle code repo as a remote to your current local Git repo:

git remote add googlecode https://code.google.com/p/myprojectname git push googlecode master git push googlecode --all 

If google code is your only upstream repo, you can name that remote origin instead of googlecode.

Make sure you local config (git config or in <your local repo>/.git/config) contains:

["origin"] fetch = +refs/heads/:refs/remotes/origin/ url = https://code.google.com/p/projectname/ 

(or ["googlecode"] if you choose that remote name)

Make sure you created the ~/.netrc (unix) or %HOME%/_netrc (windows, meaning you need to define HOME) file in your user home directory with following content:

machine code.google.com login <login> password <login> 

And use the latest git version possible (like msysgit1.7.10 if you are on Windows)

Sign up to request clarification or add additional context in comments.

7 Comments

@Erith what does git remote -v returns?
@Erith: answer edited with other recommendations. What version of Git are you using? Are you on Windows or Unix? What exact command are you typing when getting those error messages? Don't hesitate to edit your question to add those details rather than leaving a gazillon of comments ;)
@Erith: please let's on focus on the part where you " edit your question to add detail" rather than making those comments any longer ;) Try also a git push googlecode googlecode:master as in stackoverflow.com/a/620291/6309
I followed VonC's recommendation to change my .netrc file and now i have an error so i changed that back to the original file ... then i followed his advice to add his lines and i got errors ... i will try your line and see i that works while i am in the directory that i need to upload from ... i imagine that would work ...
i just entered your code GIT PUSH GOOGLECODE GOOGLECODE:MASTER and i received the following ERROR src refspec googlecode does not match any ... does this have something to do with the config file from above?
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.