zoukankan      html  css  js  c++  java
  • [git]git 分支

    什么动作,关键看你想完成什么

    1. 添加新的远程分支:

    git push origin current_local_branch:new_remote_branch

    2. 删除远程分支(冒号前必须要有空格)

    git push origin :remote_branch

    3. 切换到远程分支(只作临时)

    git checkout remotes/origin/new_remote_branch

    4. clone远程某个分支

    git clone -b new_remote_branch https://github.com/***/***.github.git

    5. 新建repo

    • 首先在github上新建一个repo
    • 然后github也有提示
      echo "# repo_test" >> README.md
      git init
      git add README.md
      git commit -m "first commit"
      git remote add origin https://github.com/aaronRong/repo_test.git
      git push -u origin master
    • git branch -a 可以看到本地出现了remotes/origin/master分支

  • 相关阅读:
    svn Mac
    webpack实用配置
    vuex状态管理-数据改变不刷新
    element-vue-koa2-mysql实现文件上传
    Promise的理解
    mysql Mac篇
    python 24 days
    python 7 days
    python 27 days
    python 26 days
  • 原文地址:https://www.cnblogs.com/aaronLinux/p/5918330.html
Copyright © 2011-2022 走看看