git ---分支操作

Posted Overboom

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了git ---分支操作相关的知识,希望对你有一定的参考价值。

Git鼓励大量使用分支:

查看分支:git branch

创建分支:git branch <name>

切换分支:git checkout <name>或者git switch <name>

创建+切换分支:git checkout -b <name>或者git switch -c <name>

合并某分支到当前分支:git merge <name>

删除本地分支:git branch -d <name>

删除远程分支:git push origin --delete [branchname]

推送本地分支到远程分支

以上是关于git ---分支操作的主要内容,如果未能解决你的问题,请参考以下文章

Git Manual / Git使用手册 / Git, GitLab, Git Bash, TortoiseGit

Git 教程 - Git 基本用法

Windows系统Git配置教程(Git配置git config)

02_创建Git仓库,克隆仓库,git add,git commit,git push,git pull,同行冲突,不同行冲突的结局方案,git mergetool的使用

4、git add和git commit

【Git原理】深入理解git add和git commit命令