Git学习笔记(一)
# vim readme.txtYou have new mail in /var/spool/mail/root
# cat readme.txt
hehe
# git status
# On branch master
#
# Initial commit
#
# Untracked files:
# (use "git add ..." to include in what will be committed)
#
#readme.txt
nothing added to commit but untracked files present (use "git add" to track)
添加一个新文件,readme.txt
# git add readme.txt
# git status
# On branch master
#
# Initial commit
#
# Changes to be committed:
# (use "git rm --cached ..." to unstage)
#
#new file: readme.txt
#
# git commit -m "the first commity"
the first commity
1 file changed, 1 insertion(+)
create mode 100644 readme.txt
You have new mail in /var/spool/mail/root
说明,commit -m 后面的内容只是针对本次提交的一个描述
# git status
# On branch master
nothing to commit, working directory clean
# vim deply.sh
You have new mail in /var/spool/mail/root
# git status
# On branch master
# Untracked files:
# (use "git add ..." to include in what will be committed)
#
#deply.sh
nothing added to commit but untracked files present (use "git add" to track)
# git add deply.sh
# git commit -m "2th commit"
2th commit
1 file changed, 2 insertions(+)
create mode 100644 deply.sh
# git status
# On branch master
nothing to commit, working directory clean
# ls -l
total 8
-rw-r--r--. 1 root root 22 Nov 26 17:15 deply.sh
-rw-r--r--. 1 root root5 Nov 26 17:07 readme.txt
页:
[1]