git-常见命令/问题

 

创建的项目目录下,

git bash
初始化生成.git,       就是创建版本库,就是一个文件,该文件下会被git管理
git init
  • who you are?
     git config --global user.name "Your Name"
     git config --global user.email "email@example.com"
     eg:
     git config --global user.name "晁阳"
     git config --global user.email "2279679717@qq.com"

  • 提交代码
    (1)add
    git add hello.js           //此时只是放到了暂存区,git add *
    (2)commit
    git commit -m '描述'        //此时提交到版本库,进行管理master

  • 远程仓库
    ssh-keygen -t rsa -C "youremail@example.com"//已经生成pub秘钥
    1--GitHub上
    echo "# -" >> README.md
    git init
    git add README.md
    git commit -m "first commit"
    git remote add origin https://github.com/cy2zq/-.git
    git push -u origin master

    其他:https://github.com/. 访问不了或者慢

git clone 慢,--depth 1

git clone https://github.com/cy2zq/arthas.git --depth 1

​​​​​​​查询git IP。点击链接,查询IP

找到IP直接访问,应该能迅速进入才对 

修改host --事例如下所示

140.82.114.4 github.com
 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值