After modifying the code and submitting it via git commit, the log reported is as follows
deMacBook-Pro:cheatsheetcup yoo$ git commit -m"modified Cheatsheet.html"
On branch master
Changes not staged for commit:
modified: Python Cheatsheet.html
Untracked files:
.DS_Store
.idea/
no changes added to commit
Whether the content in the file Python Cheatsheet.html has been committed successfully
怪我咯2017-05-02 09:31:34
Before executing commit, choose git add Cheatsheet.html or git add .
Then git commit -m "modified Cheatsheet.html"
世界只因有你2017-05-02 09:31:34
Git is divided into workspace and repository. The workspace is your code, and the repository is the git record.
Before modifications enter the repository, there is a temporary storage area also called an index, which is the area recorded after the git add operation. When committing, the records in the staging area are added to the version database. Your prompt says that staged has no content, which means you have not performed an add operation.
See here for details http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/0013745374151782eb658c5a5ca454eaa451661275886c6000
世界只因有你2017-05-02 09:31:34
Use .gitignore to block the Untracked files that you don’t want to display. It won’t be good if they appear every time
曾经蜡笔没有小新2017-05-02 09:31:34
git
这里有点特殊。要先加入到 staging area 的改动才会被 git commit
提交。同一个文件也可以 add
多次。不想add
Can:
git commit -m 'msg' <file>
or
git commit -m 'msg' -a