将.jar文件添加到git存储库中 [英] Add .jar files into a git repository

查看:512
本文介绍了将.jar文件添加到git存储库中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在eclipse上有一个项目,最近我在其中创建了一个名为lib的新文件夹,并在其中添加了一些.jar文件. 我似乎无法将更改提交到git.它只是没有出现在文件的跟踪列表中. 我从分支中的.gitignore中删除了.jar,并提交了更改,并且仍然相同.

I have a project on eclipse where recently i created a new folder called lib and added some .jar files inside. I cannot seem to commit the changes to git. It just doesnt appear in the tracked list of files.. I have removed .jar from .gitignore in my branch and commited the changes, and still the same.

推荐答案

您将文件放在项目包中,但没有将它们置于版本控制之下.您只需要通过"git add"命令将它们添加到VCS中即可.这是很好的文档.

You put your files in the project package, but you didn't put them under version control. All you need is to add them to VCS by "git add" command. Here is good documentation.

您应该在git bash或终端中使用此命令(如果已将git添加到路径中)

You should use this command in git bash or in terminal (if you have added git to path)

我还建议您将构建管理器用作Maven,Gradle或Ant来添加依赖项.祝你好运!

Also I recommend you to use build manager as Maven, Gradle or Ant to add you dependencies. Good luck!

这篇关于将.jar文件添加到git存储库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆