简体   繁体   English

git 将 maven 项目添加到现有存储库

[英]git add a maven project to a existing repository

I work with Eclipse and Git.我与 Eclipse 和 Git 合作。 I created a maven project and now I want to add it to the git repository.我创建了一个 maven 项目,现在我想将它添加到 git 存储库中。 This repository isn't empty.此存储库不为空。

The is Eclipse screen Eclipse屏

在此处输入图像描述

I have some maven projects on the branch transfesa.我在分支 transfesa 上有一些 maven 项目。 I want to add the new Maven project to transfesa.我想将新的 Maven 项目添加到 transfesa。

Check your project on disk where it is created.检查创建项目的磁盘上的项目。

If it is inside your existing repository you simply can git status and it will show all the new files added under your new project.如果它在您现有的存储库中,您只需git status ,它将显示在您的新项目下添加的所有新文件。

If not then create you new projects with other projects(at sibling level hierarchy on the disk).如果没有,则使用其他项目创建新项目(在磁盘上的同级层次结构中)。 This will let you add and commit new project to existing repository on your branch.这将允许您添加新项目并将其提交到分支上的现有存储库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM