我想集成git
到使用Eclipse IDE创建的现有项目中。
目前,我的项目位于以下位置: z:\workspace\myProject
但是有些文件和文件夹我不想跟踪,git
例如:
z:\workspace\myProject\images
z:\workspace\myProject\static_info.txt
z:\workspace\myProject\static_info_class.class
我如何在不中断项目的情况下将git添加到该环境中呢?
另外,git
已经在具有url的远程服务器上创建了存储库:https://<username>@<server_location.com>:<port>/parent_dir/myproject.git
因此,我想git
使用Eclipse IDE在已经存在的存储库中签入我的项目。
我已经在Eclipse IDE中安装了EGIT。
注意:我不想clone
将项目放入新的工作区中并将我的工作项目放置在新创建的位置,<somepath>\myproject
然后提交并推送整个项目。
你有Git bash吗?
如果是,请转到位置z:/ workspace /
git init
在您的.gitignore文件中添加* .jpeg,*。txt和* .class
然后将与项目相关的文件添加到您的舞台
git add .
然后使用
git commit -m "Your Custom Commit Messages"
然后将您的代码推送到远程,请执行以下操作
git remote add origin https://<username>@<server_location.com>:<port>/parent_dir/myproject.git
git push origin master
您可以使用以下命令在远程验证当前项目
git remote -v
我相信EGIT也可以帮助您完成上述步骤。我希望这会有所帮助。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句