页面">laomu个人页面

文章目录
  1. 1. 服务器环境
  2. 2. ide客户端
  3. 3. 代码托管
  4. 4. 常用命令
  • git使用
  • gitignore
  • git errors
  • 服务器环境

    • github
    • gitlab
    • gogs

    ide客户端

    • sourcetree
    • git for window

    代码托管

    https://github.com
    https://coding.net/

    常用命令

    git clone
    git pull git fetch + git merge
    git fetch 更新缓存到本地
    git checkout -b local-branch origin/remote-branch

    git branch -a 分支列表

    git stutus 修改文件列表
    git diff 查看修改内容
    git log 查看提交记录

    git add . 将修改文件加到提交内容列表区
    git commit -m ‘msg’ 提交修改到本地缓存区

    git merge

    git push
    git reset HEAD^ 重置,^代表恢复一次提交

    git使用

    • git config –global user.name “wirelessqa”
    • git config –global user.email wirelessqa.me@gmail.com
    • push失败,failed to connect to github port 443: timed out
      删除用户名,密码,代理
      删除代理
      git config –unset (–global) http.proxy

    gitignore

    1
    2
    /dest/*
    !/dest/css/ #不忽略文件
    • 假如已经有内容加入到git中,再添加到gitignore将不起作用

    git errors

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    error: RPC failed; result=22, HTTP code = 411
    fatal: The remote end hung up unexpectedly
    fatal: The remote end hung up unexpectedly
    Everything up-to-date
    If you attempt to push a large set of changes to a Git repository with HTTP or HTTPS, you may get an error message such as error: RPC failed; result=22, HTTP code = 411. This is caused by a Git configuration default which limits certain HTTP operations to 1 megabyte.
    To change this limit run within your local repository
    git config http.postBuffer *bytes*
    where bytes is the maximum number of bytes permitted. For exmaple:
    git config http.postBuffer 524288000
    For 500MB (thanks @Hengjie)
    文章目录
    1. 1. 服务器环境
    2. 2. ide客户端
    3. 3. 代码托管
    4. 4. 常用命令
  • git使用
  • gitignore
  • git errors