git 不常用命令

  1. 删除远程分支

    git push origin :<分支名称>

  2. 使用远程代理更新、提交代码

    https_proxy="127.0.0.1:1080" git pull
    https_proxy="127.0.0.1:1080" git push
  3. 更改本地分支名称
    git branch -m <old_branch_name> <new_branch_name>
  4. 更改github提交方式

    vim .git/config
    更改url值为https或者ssh的地址,然后执行以下命令:
    git config --global http.proxy 'socks5://127.0.0.1:1080'
    git config --global https.proxy 'socks5://127.0.0.1:1080'

  5. 未完待续......
posted @ 2017-02-07 15:01  lonersun  阅读(211)  评论(0编辑  收藏  举报