zoukankan      html  css  js  c++  java
  • git常规使用的命令

    注: xxxx代表你的分支名称
     
    1:本地新建一个分支,与远程分支关联:
    git branch --set-upstream-to origin/xxxx xxxx
     
    2:创建本地分支:
    git  branch xxxx
     
    3:切换本地分支:
    git checkout xxxx
     
    4:创建,并切换到新的分支:
    git checkout -b xxxx
     
    5:远程已有remote_branch分支但未关联本地分支local_branch且本地已经切换到local_branch
    git push -u origin/remote_branch
     
    6:远程没有有remote_branch分支并,本地已经切换到local_branch
     git push origin local_branch:remote_branch
     
    7:删除本地分支local_branch
     git branch -d local_branch (git branch -d | -D branchname )
     
    8:删除远程分支remote_branch
     git branch -d -r branchname 删除远程branchname分支
     
    9:分支重命名: 
    git branch -m | -M oldbranch newbranch 重命名分支,如果newbranch名字分支已经存在,则需要使用-M强制重命名,否则,使用-m进行重命名。
     
    10.查看本地分支
    git branch
     
    11.查看远程和本地分支
     git branch -a
  • 相关阅读:
    chlick 在 blur 之后触发
    屏蔽运营商广告
    script标签清除缓存
    http-equiv 详解
    jqLite
    js 时间戳和转换-转载
    JS数组的常用方法
    js 前端实现文件流下载的几种方式
    解决兼容性的库
    移动端兼容性问题
  • 原文地址:https://www.cnblogs.com/tom-plus/p/6632428.html
Copyright © 2011-2022 走看看