2017-07-07 27 views
1

所以我試圖讓我的生活更輕鬆,並使用命令行來執行git add。然後做一個git commit -m,當我在放置文件的文件夾中時,它會起作用。但是,當我在它上面在裏面有所有的文件的文件夾師傅說,它是這樣似乎無法添加git commit和push,除非我在文件夾正上方的文件夾中

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: wp-content/themes/FoundationPress (modified content)" 

我可以進去,然後添加文件,然後CD一路攀升至的頂部文件夾並添加它,但我希望能夠從頂部文件夾一次性添加所有內容。

有誰知道我在做什麼錯,以及如何解決這個問題?

+0

FoundationPress似乎是一個子模塊,而不是文件。 – 1615903

回答

1
(modified content) 

這是因爲wp-content/themes/FoundationPressgitlink,那就是:special entry in the index of the parent repo

它表明submodulewp-content/themes/FoundationPress已經改變,意味着它的樹SHA1已經改變。
You can list that SHA1有:

git rev-parse @:./wp-content/themes/FoundationPress 

你需要爲了加入並提交新的SHA1任何人克隆你的回購能夠在正確的狀態籤子模塊。

+0

我確定這是對的,但是你能否爲我多一點點蠢? – Branduo

+0

@Branduo當然;讓我們從開始:https://stackoverflow.com/a/1979194/6309 – VonC

+0

我想這對我仍然沒有太大的意義:( – Branduo