使用 git 访问 Netbeans 中的存储库
我在服务器上的 webroot 文件夹中创建了一个存储库,并尝试在 Netbeans 中克隆它(通过 git 插件)。
我正在使用 CakePHP,因此我将“app/”文件夹添加为跟踪文件夹。当我获得目录列表时,我可以看到一个“.git”文件,但在 Netbeans 内,如果我转到 Team > git >克隆...并在指定正确的 git 存储库(即:ssh://myip:port/home/myusername/public_html/myurl.com/.git)后连接,没有分支可供我选择。
如果我在 myurl.com 文件夹中,并输入 git status,我会得到:
# On branch master
#
# Initial commit
#
# Changes to be committed:
# (use "git rm --cached <file>..." to unstage)
#
# new file: app/.htaccess
# ... (cont'd)
其中列出了我的应用程序文件夹中的所有内容。
这对我来说是全新的,所以如果我忽略了一些相当明显的事情,请原谅我。我正在阅读 Netbeans git 文档,但我陷入了第 4 步
。我喜欢启动并运行它,这样我就可以在多台机器上处理我的项目。
I created a repo in my webroot folder on my server, and I'm trying to clone it within Netbeans (through a git plugin).
I'm using CakePHP, so I added my "app/" folder as a tracked folder. When I get a directory listing, I can see a ".git" file, but inside Netbeans, if I go to Team > Git > Clone... and connect after specifying the proper git repository (which is : ssh://myip:port/home/myusername/public_html/myurl.com/.git) there are no branches for me to select.
If I am inside the myurl.com folder, and enter git status
, I get:
# On branch master
#
# Initial commit
#
# Changes to be committed:
# (use "git rm --cached <file>..." to unstage)
#
# new file: app/.htaccess
# ... (cont'd)
Which lists everything in my app folder.
This is all new to me, so forgive me if I overlooked doing something fairly obvious. I'm reading the Netbeans git documentation, but am stuck on Step 4.
Would love to get this up and going, so I can work across multiple machines on my projects.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
“初始提交”表示您创建了存储库,但尚未向其中提交任何内容。因此还没有可以克隆的分支。
我建议阅读 Pro Git (现已添加到 官方 Git 站点)或其他一些 git 教程。然后您将更好地理解 Netbeans 显示的命令。
顺便说一句,Netbeans 并没有显示 git 中的所有功能。它只是让使用常规命令变得更容易。
The "Initial commit" indicates that you created the repository but have not commited anything to it. Therefore there are no branches to clone yet.
I'd recomend reading Pro Git (now added to the official Git site) or some other git tutorial. Then you'll understand better the commands that Netbeans displays.
By the way, Netbeans doesn't show all the features in git. It just makes it easier to use the regular commands.