1
下面我都試過,但似乎不工作如何在一個命令中使用git提交修改過的文件和文件夾?
$ git commit -m "Changes" vendor/* dev/* .htaccess composer.json
錯誤
error: pathspec 'vendor/cweagans' did not match any file(s) known to git.
error: pathspec 'vendor/magefan' did not match any file(s) known to git.
error: pathspec 'vendor/phpoffice' did not match any file(s) known to git.
我有修改過的文件的多個文件夾。
如何提交所有使用一個命令?
從地方我需要更改推及於服務器需要拉。 'git add'會添加文件嗎?我修改了多個文件夾和單個文件中的文件,以及在 –
問題中提到的問題。我不確定你在問什麼,或者你對git的工作方式感到困惑。 'add'和'commit'命令在_local_存儲庫上工作(請參閱https://www.atlassian.com/git/tutorials/saving-changes)。 Git'push'和'pull'與中央資料庫同步(https://www.atlassian.com/git/tutorials/syncing)。正如Greg所說,你使用'add'來告訴git你想'將一個文件提交給_local_存儲庫,並且當你認爲代碼已經準備好共享時,你可以使用push來移動已經提交的代碼直到中央存儲庫。 –