这篇文章主要的目的是记录一下git中关于分支相关的操作记录. 本文会持续更新,所有的操作都经过本人实践,可以正常运行,并且可以解决问题.
我就不罗嗦介绍什么事Git和Git有多么牛了.
1 2 3 4 | git checkout -b new_local_branch_name repository_name/remote_branch_name ##Example git checkout -b custom origin/custom ##建议是本地的分支名字和其对应的远程分支名称一样. |
---|
1 | git branch |
---|
1 | git branch -r |
---|
1 | git branch -d your_branch_name |
---|
1 | git branch -D your_branch_name |
---|
1 | git push origin --delete your_branch_name |
---|
或者更简单的写法
1 | git push origin :your_branch_name |
---|