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. VS Code 使用教程详解

    一.写在前面 1.为什么选择 \(VS\) \(code\) 一款非常好用的代码编辑器 标准化 \(Language\) \(Service\) \(Protocol\) 内置调试器和标准化 \(De ...

  2. LOJ10196越狱

    题目描述 原题来自:HNOI 2008 监狱有连续编号为 1 到 n 的 n 个房间,每个房间关押一个犯人.有 m 种宗教,每个犯人可能信仰其中一种.如果相邻房间的犯人信仰的宗教相同,就可能发生越狱. ...

  3. stop脚本

    PID=$(ps -ef | grep eladmin-system-2.0.jar | grep -v grep | awk '{ print $2 }')if [ -z "$PID&qu ...

  4. mysql-mysqli_fetch_all(错误)

    mysql-mysqli_fetch_all(错误) 问题:使用mysql-mysqli_fetch_all获取返回的数组时失败/报错 原因及解决方法: mysqli_fetch_all函数只存在于m ...

  5. SpringMVC数据校验并通过国际化显示错误信息

    目录 SpringMVC数据校验并通过国际化显示错误信息 SpringMVC数据校验 在页面中显示错误信息 通过国际化显示错误信息 SpringMVC数据校验并通过国际化显示错误信息 SpringMV ...

  6. MySQL常用SQL语句1

    -- 创建表 CREATE TABLE USER ( -- id默认每个表都该拥有(非空 不重复) -- (id是每一行的唯一标识) -- 其他字段可能会重复,我们无法依赖其他的字段去确定某一行记录 ...

  7. HDU - 6761 Minimum Index (字符串,Lyndon分解)

    Minimum Index 题意 求字符串所有前缀的所有后缀表示中字典序最小的位置集合,最终转换为1112进制表示.比如aab,有三个前缀分别为a,aa,aab.其中a的后缀只有一个a,位置下标1:a ...

  8. hdu5643 King's Game(约瑟夫环+线段树)

    Problem Description In order to remember history, King plans to play losephus problem in the parade ...

  9. python+selenium+bs4爬取百度文库内文字 && selenium 元素可以定位到,但是无法点击问题 && pycharm多行缩进、左移

    先说一下可能用到的一些python知识 一.python中使用的是unicode编码, 而日常文本使用各类编码如:gbk utf-8 等等所以使用python进行文字读写操作时候经常会出现各种错误, ...

  10. Codeforces Round #650 (Div. 3) F1. Flying Sort (Easy Version) (离散化,贪心)

    题意:有一组数,每次操作可以将某个数移到头部或者尾部,问最少操作多少次使得这组数非递减. 题解:先离散化将每个数映射为排序后所对应的位置,然后贪心,求最长连续子序列的长度,那么最少的操作次数一定为\( ...