我想将我的网络目录上传到项目的Google代码。
我用来将目录上传到Google代码的终端命令是什么?
答案 0 :(得分:2)
只需将您的ggogle代码仓库作为远程添加到您当前的本地Git仓库:
git remote add googlecode https://code.google.com/p/myprojectname
git push googlecode master
git push googlecode --all
如果Google代码是您唯一的upstream个回购,则可以name that remote origin
代替googlecode
。
确保您的本地配置(git config
或<your local repo>/.git/config
)包含:
["origin"]
fetch = +refs/heads/:refs/remotes/origin/
url = https://code.google.com/p/projectname/
(如果您选择远程名称,则为["googlecode"]
)
确保您在用户主目录中创建了~/.netrc
(unix)或%HOME%/_netrc
(窗口,意味着您需要定义HOME
)文件,其中包含以下内容:
machine code.google.com
login <login>
password <login>
并尽可能使用最新的git版本(如果你在Windows上,请使用msysgit1.7.10)