未提交git

时间:2018-04-14 02:56:56

标签: git

我尝试将更改提交到git,但我有此消息说Changes not staged for commit:。之前,我一直使用的命令是git add-commit -m "message",但现在我不知道这个版本的git中使用的语法是 git version 2.15.0 。我在git网站上查找了文档,但没有运气。有人可以帮我这个吗?

enter image description here

2 个答案:

答案 0 :(得分:3)

1)使用-a标志进行自动添加:

git commit -am "your message"

或2)

git add --all 然后 git commit -m "Your message"

答案 1 :(得分:0)

分解步骤,以正确理解内部发生的事情。

第1步:

 ## Add your modified files to stage area using,
 git add -u

第2步:

 ## Commit/Take snapshot your modified files with message on the staging area
 git commit -m "Add php and bash file payroll"

第3步:

 ## Push your changes to remote branch using,
 git push 
相关问题