如何git提交整个文件夹? [英] how to git commit a whole folder?
本文介绍了如何git提交整个文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是一个文件夹,其中包含许多.java文件.
Here is a folder, which contains a lot of .java files.
如何git commit这个文件夹?
How can I git commit this folder ?
如果我执行以下命令
git add foldername
git commit foldername -m "commit operation"
我会看到消息 提交但未添加任何内容,但存在未跟踪的fils(使用"git add"进行跟踪)
I will see the messages nothing added to commit but untracked fils present (use "git add" to track)
推荐答案
您没有提交文件夹",而是按照完成的操作添加了文件夹,然后只需提交所有更改.该命令应为:
You don't "commit the folder" - you add the folder, as you have done, and then simply commit all changes. The command should be:
git add foldername
git commit -m "commit operation"
这篇关于如何git提交整个文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文