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

  • 相关阅读:
    C语言中标识符的作用域、命名空间、链接属性、生命周期、存储类型
    循环练习
    ArrayList集合

    方法
    表单标签
    HTML基础
    二维数组
    一维数组
    switch选择结构
  • 原文地址:https://www.cnblogs.com/aaronLinux/p/5918330.html
Copyright © 2011-2022 走看看