在我犯錯之前,我需要知道我要做的是正確的。我做了一些研究,但仍然希望確保,因爲我是GIT的新手,害怕搞亂整個項目。是的,有很多例子,但我很困惑。就這樣。只推送一個文件到GIT
我在本地GIT中有3個文件,只是想提交其中一個文件並將其推送到GIT中。那麼這些步驟是否正確?
我認爲我應該做什麼!
sudo git add web/js/admin/design.js
sudo git commit -m 'Bug fix'
sudo git push origin sprint-6
GIT狀態:
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)
modified: src/Hello/AdminBundle/Controller/DesignController.php
modified: web/js/admin/design.js
Untracked files:
(use "git add <file>..." to include in what will be committed)
src/Hello/AdminBundle/Utility/DesignPublisher.php
no changes added to commit (use "git add" and/or "git commit -a")
鑑於你'git的狀態「似乎你正在做正確的步驟。 –
你爲什麼用sudo打電話給Git? –