您的位置:首页 > 其它

Git 基本命令记录(1)

2018-03-18 16:30 337 查看
1.git的一些配置
     配置用户名:git config --global user.name281910885@qq.com
     配置邮箱:git config --global user.email281910885@qq.com
     
2.git查看帮助文档
     git config --help
     git help config 

3.git查询
     git config user.name
     git config --get user.name

4.查询所有list
   $ git config --list --global

5.git初始化
     git init git_test_folder
     cd git_test_folder
     touch a
     touch b
     git add a b
     git status
     
6.git提交到暂存区
     git commit -m "test git"

7.git删除文件
     git rm fileName
       
8.git还原
   git reset HEAD .a.swp

9.删除缓存区文件
   git rm --cache .a.swp

10.git重命名
   git mv a c

二、git本地分支与合并
1.git新建分支
   git branch test
   git checkout test
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  git 版本控制