首页 > 其他 > 详细

git配置使用

时间:2019-12-18 18:26:27      阅读:97      评论:0      收藏:0      [点我收藏+]

本地文件    >>>>>>  缓存区 >>>>>>  仓库

技术分享图片

 

 

一 本地仓库

1.配置用户名和邮箱

git config --global user.name "Taysem" 

git config --global user.email "1580011497@qq.com"

 

2.初始化一个仓库

  

1.创建文件夹  test
2. 进入到文件夹test
    cd test
    然后在git  init

  

  

3.向仓库添加文件

1.创建文件  touch  test.py
2.查看状态, git status
3.提交文件: git add test.py  到缓存区
4.将文件从缓存区提交到仓库: git commit -m ‘test.py‘

  

 

4.修改仓库文件

1. 查看一下状态: git status
2. 编辑文件:   vi  test.py (同linux)
3.提交文件: git add test.py  到缓存区
4.将文件从缓存区提交到仓库: git commit -m ‘test.py‘

  

 

5.删除文件

1. 删除文件 rm -rf test.py
2. 从git中删除文件: git rm test.py
3.提交描述: git commit -m ‘描述信息‘

  

  

 二 远程仓库

git配置使用

原文:https://www.cnblogs.com/taysem/p/12061205.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!