git status
提示:
On branch master
No commits yet
nothing to commit (create/copy files and use "git add" to track)
vim goo.txt
git status
提示:
on branch master
no commits yet
untracked file:
(use "git add <file>..." to include in what will be committed)
good.txt
nothing added to commit but untracked files present(use "git add" to track)
git add good.txt
提示:
warning:LF will be replaced by CRLF in good.txt.
The file wile have its original line endings in your working directory
git status
提示:
on branch master
no commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: good.txt
git commit good.txt
提示:
warning: LF will be replaced by CRLF in good.txt.
The file will have its original linne endings in your working diewctory.
hint: Waiting for your editor to close the file...
自动进入了vim编辑器
My firest commit.new file good.txt
提示:
Please enter the commit message for your chanses. Lines starting
wite '#' will be ignored, and an empty message aborts the commit.
On branch master
Initial commit
Changes to be committed:
new file: good.txt
:set nu
#显示行号
i
#进入插入模式
:wq
#保存退出
#[master (root-commit) 744e2e4] My first commit.new file good.txt
#1 file changed, 3 insertions(+)
#create mode 100644 good.txt
Cat good.txt
内容:
aaaaaaa
bbbbbbb
ccccccc
git status
#On branch mastrer
#nothing to commit,, working tree clean