簡體   English   中英

在Github中提交

[英]Commit in Github

我使用以下命令:

git add *
git commit -am 'updating'

我在下面遇到了:

# On branch master
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#   (commit or discard the untracked or modified content in submodules)
#
#   modified:   webkomiks (modified content)
#
no changes added to commit (use "git add" and/or "git commit -a")

我應該怎么做?

我繼續:

git push myrep master

我只看到github中的文件夾,沒有看到文件夾中的文件。

謝謝

您沒有遞歸地提交到子目錄。

嘗試git add . 代替git add *

webcomiks是否可能是子模塊?

如果是這樣,則需要進入子模塊目錄,提交並推送該子模塊中的更改,然后轉到主存儲庫並從那里進行提交。

webkomiks是目錄還是文件或其他內容?

如果您想添加webkomiks,如Johan Paul所說,請運行'git add webkomiks'

嘗試git clean -n ,它將為您提供更多信息。 如果它是目錄,它將說“不會刪除”。 當然,您可以通過添加' -d '選項將其刪除。

如錯誤消息所述:

 Changes not staged for commit:
 ...
 modified:   webkomiks (modified content)

那可能是一個目錄嗎? 這不包含在提交中。 這樣做git add webkomiks並再試一次。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM