[CVS] git 使用

下载 : http://pan.baidu.com/s/1kT5nRuf 密码: f7b2
常见的公共平台:
1. https://github.com/
2. https://gitlab.com
3. https://code.csdn.net/dashboard/index

常见配置(http://git-scm.com/book/en/v2/GitHub-Account-Setup-and-Configuration)

$ git config --global core.quotepath false
$ git config --global i18n.logOutputEncoding utf-8
$ git config --global i18n.commitEncoding utf-8
$ git config --global user.name 'xxx'
$ git config --global user.email 'xxx@gmail.com'
$ git config --global color.ui true

$ git config --global alias.ci commit
$ git config --global alias.st status
$ git config --global alias.co checkout
$ git config --global alias.br branch

# 第一种是在现存的目录下,通过导入所有文件来创建新的 Git 仓库。
$ git init
$ git add *.c
$ git add README
$ git commit -m 'initial project version'
# 第二种是从已有的 Git 仓库克隆出一个新的镜像仓库来(常用).
$ git clone https://github.com/liqiang199105/Spoon-Knife.git
$ git clone https://github.com/liqiang199105/Spoon-Knife.git [your_name]
# 远程库(http://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes)
$ git remote //查看仓库别名
$ git remote -v //查看所有fetch & push仓库
$ git remote show [remote-name] //查看远程仓库信息
$ git remote add github https://github.com/liqiang199105/Spoon-Knife.git //添加远程仓库
$ git remote rename github mygithub //远程仓库的重命名
$ git remote rm mygithub //远程仓库的删除

$ git fetch [remote-name] //从远程仓库抓取数据
$ git push [remote-name] [branch-name] //推送数据到远程仓库
  • 分支 (CRUD)
  • 未完待续...

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值