Discuss / Git / git commit 指不指定文件,提交的内容应该是不一样的

git commit 指不指定文件,提交的内容应该是不一样的

Topic source

vctor666

#1 Created at ... [Delete] [Delete and Lock User]

不指定文件的时候只提交缓存区,也就是老师的结果。 指定文件,e.g. git commit * 会直接提交工作区,也就是有疑问同学的方法。

python大帝

#2 Created at ... [Delete] [Delete and Lock User]

正解,找到关键点,大家可以试下修改(非新建)一个文件,分别使用git commit -m "xxxx"和git commit filename -m "xxxx"


  • 1

Reply