git cli all in one

https://www.atlassian.com/git/tutorials/learn-git-with-bitbucket-cloud

git create remote branch

# Create a new branch and check it out
$ git checkout -b <branch-name> # The remote branch is automatically created when you push it to the remote server.
# <remote-name> is typically origin
$ git push <remote-name> <branch-name> $ git push <remote-name> <local-branch-name>:<remote-branch-name> $ git push --set-upstream <remote-name> <local-branch-name>
# create a new branch & check it out
$ git checkout -b test # local & remote with the same name
$ git push origin test # local & remote with a different name
$ git push origin test:dev # delete remote brach bug, if only `:<remote-branch-name>`
$ git push origin :dev # delete remote branch
$ git push origin --delete test
# OR
$ git push origin :test

https://tecadmin.net/how-to-create-a-branch-in-remote-git-repository/

https://stackoverflow.com/questions/1519006/how-do-you-create-a-remote-git-branch

git

# list all branch(local)
$ git branch --list
$ git branch -l
# OR
$ git branch # list all remote branches
$ git branch -a
# Q === quit # create branch
# $ git checkout -b <branch_name>
$ git checkout -b test
# OR
# $ git branch <branch_name>
$ git branch test # delete branch
# -d safe delete
# $ git branch -d <branch_name>
$ git branch -d test
# Deleted branch test (was 686c96b). # -D force delete
# $ git branch -D <branch_name>
$ git branch -D test # rename the current branch
# $ git branch -m <branch>
$ git branch -m test # change branch
$ git checkout branch flutter-app
# creating remote branch

# Add remote repo to local repo config
# $ git remote add new-remote-repo https://github.com/user/repo.git
$ git remote add new-remote-repo https://github.com/xgqfrms/test.git # push the test branch to new-remote-repo
$ git push <new-remote-repo> test

https://www.atlassian.com/git/tutorials/using-branches

  flutter-app
test
* master
  flutter-app
test
* master
remotes/origin/HEAD -> origin/master
remotes/origin/gh-pages
remotes/origin/master


xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


git cli all in one的更多相关文章

  1. 在Linux上用自己编译出来的coreclr与donet cli运行asp.net core程序

    先在 github 上签出 coreclr 的源代码,运行 ./build.sh 命令进行编译,编译结果在 coreclr/bin/Product/Linux.x64.Debug/ 文件夹中. 接着签 ...

  2. how to remove git commit history

    how to remove git commit history 如何删除 GitHub 仓库的历史数据 git filter-branch remove GitHub git commit hist ...

  3. git in depth

    git in depth git delete remote branch # Deleting remote branches in Git $ git push origin --delete f ...

  4. git config all in one

    git config git global config # git global config $ git config $ git config --list --show-origin $ gi ...

  5. 图解 git 流程

    图解 git 流程 Github 开源项目 1 动画 2 web repl 3 online git cli & create remote branch # Create a new bra ...

  6. 流程自动化RPA,Power Automate Desktop系列 - 批量备份Git仓库做好灾备

    一.背景 打个比如,你在Github上的代码库需要批量的定时备案到本地的Gitlab上,以便Github不能访问时,可以继续编写,这时候我们可以基于Power Automate Desktop来实现一 ...

  7. Visual Studio 2015 和 Apache Cordova 跨平台开发入门(一)

    基于 Windows 10 的 Visual Studio 2015 跨平台的应用开发主要分为基于Visual Studio 安装 Xamarin 扩展的跨Android.iOS 和 Windows的 ...

  8. Visual Studio创建跨平台移动应用_02.Cordova Extension

    1简介 本章节是关于Visual Studio Tools for Apache Cordova的,目前此产品只发布了预览版.Visual Studio for Apache Cordova帮助熟悉V ...

  9. 使用 Cordova+Visual Studio 创建跨平台移动应用(1)

    1简介 本章节是关于Visual Studio Tools for Apache Cordova的,目前此产品只发布了预览版.Visual Studio for Apache Cordova帮助熟悉V ...

随机推荐

  1. 大数据系列4:Yarn以及MapReduce 2

    系列文章: 大数据系列:一文初识Hdfs 大数据系列2:Hdfs的读写操作 大数据谢列3:Hdfs的HA实现 通过前文,我们对Hdfs的已经有了一定的了解,本文将继续之前的内容,介绍Yarn与Yarn ...

  2. springboot2.2.2集成6.5 Elasticsearch

    1.0POM文件 <!-- spring-boot --> <dependency> <groupId>org.springframework.boot</g ...

  3. Map转换为格式化的YAML字符串

    yaml与java对象的互转 yaml与java对象的互转有snakeyaml <dependency> <groupId>org.yaml</groupId> & ...

  4. pycharm设置头文件模板(for mac)

    我们要达到的效果是每次新建一个.py文件都会有头文件,关于头文件的作用之前已做解释

  5. LOJ10141染色

    SDOI 2011 染色 给定一棵有 n 个节点的无根树和 m 个操作,操作共两类. 将节点 a 到节点 b 路径上的所有节点都染上颜色: 询问节点 a 到节点 b 路径上的颜色段数量,连续相同颜色的 ...

  6. java架构《Socket网络编程基础篇》

    本章主要介绍Socket的基本概念,传统的同步阻塞式I/O编程,伪异步IO实现,学习NIO的同步非阻塞编程和NIO2.0(AIO)异步非阻塞编程. 目前为止,Java共支持3种网络编程模型:BIO.N ...

  7. snmp协议 及snmpwalk

    推荐阅读: snmp及工具:https://www.jianshu.com/p/dc2dc0222940 snmp协议详解:https://blog.csdn.net/shanzhizi/articl ...

  8. pytest内核测试平台落地初体验

    测试平台,有人说它鸡肋,有人说它有用,有人说它轮子,众说纷纭,不如从自身出发,考虑是否要做测试平台: 第1阶段,用Python+requests写接口自动化. 第2阶段,选择unitttest或pyt ...

  9. HDU6191 Query on A Tre【dsu on tree + 01字典树】

    Query on A Tree Problem Description Monkey A lives on a tree, he always plays on this tree. One day, ...

  10. Codeforces Round #644 (Div. 3)

    比赛链接:https://codeforces.com/contest/1360 A - Minimal Square 题意 计算能包含两个 $a \times b$ 矩形的最小正方形的面积. 题解 ...