|
[root@ip-172-31-22-8 molewan]# vim readme.txt
You have new mail in /var/spool/mail/root
[root@ip-172-31-22-8 molewan]# cat readme.txt
hehe
[root@ip-172-31-22-8 molewan]# 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
[root@ip-172-31-22-8 molewan]# git add readme.txt
[root@ip-172-31-22-8 molewan]# git status
# On branch master
#
# Initial commit
#
# Changes to be committed:
# (use "git rm --cached ..." to unstage)
#
#new file: readme.txt
#
[root@ip-172-31-22-8 molewan]# git commit -m "the first commity"
[master (root-commit) 24a5b30] the first commity
1 file changed, 1 insertion(+)
create mode 100644 readme.txt
You have new mail in /var/spool/mail/root
说明,commit -m 后面的内容只是针对本次提交的一个描述
[root@ip-172-31-22-8 molewan]# git status
# On branch master
nothing to commit, working directory clean
[root@ip-172-31-22-8 molewan]# vim deply.sh
You have new mail in /var/spool/mail/root
[root@ip-172-31-22-8 molewan]# 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)
[root@ip-172-31-22-8 molewan]# git add deply.sh
[root@ip-172-31-22-8 molewan]# git commit -m "2th commit"
[master f30d737] 2th commit
1 file changed, 2 insertions(+)
create mode 100644 deply.sh
[root@ip-172-31-22-8 molewan]# git status
# On branch master
nothing to commit, working directory clean
[root@ip-172-31-22-8 molewan]# ls -l
total 8
-rw-r--r--. 1 root root 22 Nov 26 17:15 deply.sh
-rw-r--r--. 1 root root 5 Nov 26 17:07 readme.txt
|
|
|