-1

i have created a repository in bitbucket and i have maven web project (eclipse ide) as in below structure

 project
   --src/main/java
   --src/main/resource
   --src/main/webapp
   .classpaht
   .project
    lib

i followed below link to create git repository and i pushed to project to but bucket, where as i have committed only java, resource and webapp files to git and pushed to bitbucket.

http://wangpidong.blogspot.com.es/2012/05/how-to-use-bitbucket-with-egit-in.html

but when i see in bitbucket i have .classpath, .project and lib folder added to the repository, which i never commited the files. i am new to git and bitbucket , i dont know how to fix, or am i doing it wrongly,, help needed

4

2 回答 2

1

可能是您使用了 Team->Add to index,然后提交,因此所有文件/文件夹都添加到存储库中。

您可以查看 github (help.github.com/articles/ignoring-files) 上提供的帮助,以获取有关如何忽略某些文件的信息。

于 2013-09-20T13:30:00.480 回答
0

只需在您的项目主页中创建一个 .gitignore 文件并将这些行添加到其中:

.classpath
.project
lib/

通过 .gitignore 文件告诉 git 忽略这些文件或目录

于 2013-09-20T13:06:47.903 回答