创建测试目录
$ mkdir demo
$ cd demo
初始化git
$
git init
创建测试文件
$ echo "Hello world" > hello
$ echo "Silly example" > example
添加到索引
$ git-add hello example
查看状态
$ git-status
提 交
$ git-commit -m "Initial commit of gittutor reposistory"
修改测试文件
$ echo "It's a new day for git" >> hello
比较差异
$ git diff
提交修改
$ git add hello
$ git commit -m "new day for git"
或者
$
git commit -a -m "new day for git"
本文将带你深入了解使用Git进行代码版本管理的全过程,包括初始化、创建目录、文件操作、添加、提交、修改、比较差异和再次提交等关键步骤。
2170

被折叠的 条评论
为什么被折叠?



