git in depth

git delete remote branch

# Deleting remote branches in Git
$ git push origin --delete feature/login # Deleting local branches in Git
$ git branch -d feature/login

https://www.git-tower.com/learn/git/faq/delete-remote-branch

https://help.github.com/en/articles/removing-a-remote

https://stackoverflow.com/questions/2003505/how-do-i-delete-a-git-branch-locally-and-remotely

git

# git clone
$ git clone git@https://github.com/xgqfrms/amp.git # git init
$ git init $ git branch $ git checkout branch/tag $ git checkout feature/longtext-multiline

git rebase

https://www.yiibai.com/git/git_rebase.html

$ git rebase origin/master 

# OR

$ git checkout master 

# master
$ git pull $ git rebase master

https://stackoverflow.com/questions/29164321/git-difference-git-rebase-origin-branch-vs-git-rebase-origin-branch/29164447

https://stackoverflow.com/questions/5963597/git-rebase-origin-vs-git-rebase-origin-master

git rebase

# fetch ??? update current branch
$ git fetch $ git checkout origin/master
# update master
$ git pull $ git checkout dev # rebase
$ git rebase master

git cli & 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

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



xgqfrms 2012-2020

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


git in depth的更多相关文章

  1. git 出现502错误后用depth一步一步来

    公司有个项目的git仓库,因为一些二进制文件也放在里面,版本迭代后,整个仓库特别大,有好几G. 直接git clone是不行的,会报这样的错误: error: RPC failed; HTTP 502 ...

  2. git clone时加上--depth 1

    当项目过大时,git clone时会出现error: RPC failed; HTTP curl The requested URL returned error: Gateway Time-out的 ...

  3. Github.com的Git和TortoiseGit图文教程

    图文介绍Windows系统下使用 Github账户 + msysgit + TortoiseGit 进行文件管理的方法. 安装 安装mysysgit 下载地址:msysgit 安装过程: 0.启动 1 ...

  4. git clone error: RPC failed; result=22, HTTP code = 502

    http://www.jianshu.com/p/645d3fe4e028 git克隆的工程太大用https的方式会有如下问题 hbl:tmp hubert$ git clone https://gi ...

  5. git clone google代码库

    git clone  https://chromium.googlesource.com/chromium/src 发现有将近7G,但是速度太慢,老是失败,提示信息先后是"The remot ...

  6. Git/Github + TortoiseGit 使用教程

    前言 Git是一个开源的分布式版本控制系统,用以有效.高速的处理从很小到非常大的项目版本管理. 在github上有很多优秀的项目,一个伟大的学习宝库.本文分享使用tortoisegit对github/ ...

  7. git 分批后的数据

    如果涉及到大文件的 git 传输, 我们可能会收到下面错误: sourceTree 的错误.   命令行的错误:   $ git clone https://********/gopher.git C ...

  8. git clone简介

    翻译整理自: http://web.mit.edu/~mkgray/project/silk/root/afs/sipb/project/git/git-doc/git-clone.html  在使用 ...

  9. CocoaPods的安装及使用/利用开源库Diplomat实现分享及第三方登录/git的使用

    <<史上最简洁版本>> 1.gem sources -l查看 当前的源 //1.1 sudo -i..以下都是以管理员的身份来操作的 2.gem sources --remov ...

随机推荐

  1. 使用JWT创建安全的ASP.NET Core Web API

    在本文中,你将学习如何在ASP.NET Core Web API中使用JWT身份验证.我将在编写代码时逐步简化.我们将构建两个终结点,一个用于客户登录,另一个用于获取客户订单.这些api将连接到在本地 ...

  2. QT之——QTableWidget拖拽单元格并替换内容(进阶)

    所需待重写函数: [virtual] bool QObject::eventFilter(QObject *watched, QEvent *event); /* * Filters events i ...

  3. 高性能缓存 Caffeine 原理及实战

    一.简介 Caffeine 是基于Java 8 开发的.提供了近乎最佳命中率的高性能本地缓存组件,Spring5 开始不再支持 Guava Cache,改为使用 Caffeine. 下面是 Caffe ...

  4. Java——接口、匿名类

    接口语法 public interface Demolnteface{ public void demo(): //其他方法 //所有方法都是抽象的 } 接口里放: 1.静态常量 (一般全部大写) 2 ...

  5. mysqld_exporter的源码分析和定制化(单个mysqld_exporter监控多个数据库实例)

    mysqld_exporter是prometheus官方提供的用于监控mysql运行状态的exporter.其相关信息可以参考:https://github.com/prometheus/mysqld ...

  6. Geotools操作GeoJSON:解析FeatureCollection对象文件

    Geotools操作GeoJSON:解析FeatureCollection对象文件 一.解析FeatureCollection对象文件 1.1 geotools操作GeoJSON过程中的问题及相关源码 ...

  7. 希尔伯特曲线python3实现

    需要OpenGL库:https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyopengl #coding:utf-8 from OpenGL.GL import * ...

  8. void(*p)()和void*p()区别

    void (*p)()是一个指向函数的指针,表示是一个指向函数入口的指地变量,该函数的返回类型是void类型.它的用法可参看下例: 例如:有一返加void值的函数swap,(swap用来交换两个数) ...

  9. python--基础1(pip,虚拟环境、python编写规范)

    python简介 1.Python是一种解释型脚本语言; 2.Python在设计上坚持了清晰划一的风格,这使得Python成为一门易读.易维护,并且被大量用户所欢迎的.用途广泛的语言; 3.pytho ...

  10. 交换机CPU使用率高的原因

    交换机CPU的功能 1.管理已配置的软件协议,例如: – 生成树协议(STP) – 路由协议,例如OSPF和EIGRP – 热备路由协议(HSRP) – 思科发现协议(CDP) – 端口聚合协议(PA ...