将项目推送到 Git 不起作用?

Push project to Git not working?

我真的需要在接下来的五分钟内将 GitHub 的项目上传到 Eclipse。 我右键单击该项目并转到 "Team",但是 none 的选项是 "Commit"。

谢谢, 卢卡斯

如果您已经创建了一个 gitHub 存储库并在您的计算机上安装了 git,您必须在 eclipse 工作区的项目目录中启动命令提示符并键入:

$ git init

然后您需要在 GitHub 上为您的存储库获取正确的 URL 并键入:

$ git remote add origin https://github.com/[username]/[reponame].git

现在,将所有文件添加到本地提交:

$ git add .   # this adds all the files

然后进行初始提交:

$ git commit -a -m "Initial commit" 

最后,要将它放在遥控器上,请执行以下操作:

$ git push -u origin --all