`
garyli
  • 浏览: 173136 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

GIT 常用命令总结

git 
阅读更多

创建测试目录

$ 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"



分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics