git 批量删除git分支_备忘单:使用Git服务器进行Git分支

git 批量删除git分支

It is common to set up git servers to host git repositories. Branching is lightweight in git and a very friendly mechanism to manage code. Here, I summarize a cheatsheet of common git branching commands for working on repositories from a git server. This post assumes that you have basic knowledge with git. If you are not familiar with git, you may want check Howto for New Git Users first.

设置git服务器来托管git存储库是很常见的。 分支在git中是轻量级的,并且是一种非常友好的代码管理机制。 在这里,我总结了一些通用git分支命令的速查表,这些命令可用于git服务器上的存储库。 这篇文章假定您具有git的基本知识。 如果您不熟悉git,则可能需要先查看“新Git用户的操作方法”

克隆仓库 (Clone a repository )

$ git clone git://example.com/your/repo.git

列出所有本地分支 (List all local branches )

$ git branch -a

更新所有分支 (Update all branches )

$ git pull

更改为分支 (Change to a branch )

$ git checkout rc

创建并推送新分支 (Create and push a new branch )

$ git branch dev-b1
$ git checkout dev-b1
$ git push origin dev-b1

创建一个分支并立即将其签出 (Create a branch and immediately check it out )

$ git checkout -b dev-b1

在某个分支上推送更改 (Push changes at a certain branch )

$ git push origin dev-b1

将所有更改推送到所有分支 (Push all changes to all branches )

$ git push

合并一个分支到另一个分支 (Merge a branch to another branch )

$ git checkout rc
$ git merge dev-b1
$ git push origin rc

合并来自另一个分支的单个提交 (Merge individual commits from another branch )

$ git cherry-pick refnumber

翻译自: https://www.systutorials.com/cheatsheet-git-branching-with-a-git-server/

git 批量删除git分支

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值