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分支

  • 相关阅读:
    学习进度条54
    学习进度条53
    学习进度条52
    学习进度条51
    学习进度条50
    学习进度条49
    学习进度条48
    学习进度条47
    学习进度条45
    线程池中的阻塞队列选择
  • 原文地址:https://www.cnblogs.com/aaronLinux/p/5918330.html
Copyright © 2011-2022 走看看