12 添加提交以及查看状态操作

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
全部评论

相关推荐

10-10 11:38
已编辑
湖南理工大学 Java
小浪_Coding:多沟通叭, 公式简历+学历一般的话难找
点赞 评论 收藏
分享
程序员牛肉:你这简历有啥值得拷打的?在牛客你这种简历一抓一大把,也就是个人信息不一样而已。 关键要去找亮点,亮点啊,整个简历都跟流水线生产出来的一样。
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务