问题描述
我正在使用Eclipse Helios和EGit。我是Git的新手。我有一个现有的Eclipse项目,用于Android应用程序,我想放在Git中。有人可以分享一些关于如何在共享文件夹上设置Git repo的说明,并将现有项目放在使用EGit的git repo中?我已经尝试过各种选项,没有成功。谢谢!
在项目的根目录中执行以下操作:
git init
在您所在的文件夹中执行相同操作想要你的祝福或中央资料库:
git init --bare
在本地存储库中,添加一个自述文件并提交:
echotesting> readme
git add readme
git commit -minitial commit
现在链接并将您的更改推送到中央存储库:
git remote add origin // server / share / repodir
git push -u origin master
希望这可以让你开始。
如果您喜欢,可以稍后使用egit,但是单独使用git没有任何问题。
I am using Eclipse Helios and EGit. I am new to Git. I have an existing Eclipse project for an Android app I would like to place in Git. Can someone please share some instructions on how to setup a Git repo on a shared folder, and place the existing project into this git repo using EGit? I have tried a variety of options with no success.
Thanks!
You can do everything from the command line instead:
Do this in the root of the project:
git init
Do the same in the folder where you want your blessed or central repository:
git init --bare
In the local repository, add a readme file and commit it:
echo "testing" > readme
git add readme
git commit -m "initial commit"
Now link and push your changes to the central repository:
git remote add origin //server/share/repodir
git push -u origin master
Hope this gets you started.
You can use egit later if you like, but there is nothing wrong with using git separately.
这篇关于如何在EGit中创建远程git存储库并将其链接到现有的Eclipse项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!