Git仓库创建

1. 创建git资源库
    git init --bare 库名称
    记住在你创建的时候,首先进入你想创建的目录,执行这个命令
Initialized empty Git repository in e:/android_software/userworkspace/de
git/sqf/

2. 在用户文件夹下把资源clone下来
    git clone <仓库目录> /g/software/repository/git/itheima <用户目录> .
    注意:clone时候用户目录必须为空

$ git clone /e/android_software/userworkspace/developer/git/sqf .

3. 创建一个文件,纳入到版本控制中。
    git add <文件名>
    第一次执行会出警告:warning: LF will be replaced by CRLF in readme.txt.
                        The file will have its original line endings in your working directory.
    警告处理:需要配置用户信息
                    git config user.name = "zhangsan"
                    git config user.email = "itheima@gmail.com"
$ git add readme.txt

4. 提交到本地版本库里。
    git commit <文件名>
    linux下的编辑器:

5. 推送到远程共享版本库中
    git push origin master

$ git push /e/android_software/userworkspace/developer/git/sqf/ master 

6. 切换用户,拉取最新的文件
    git pull


hooks 脚本
info  存放一些配置信息
objects  本机库存放数据的文件夹
refs 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值