1. 克隆远程仓库
复制仓库地址
2. git 克隆命令 git clone url
3. cd到仓库
4. 查看全部分支
命令 git branch
5. 新建分支
命令 git branch <name>
6. 切换到分支
命令git checkout <branchname>
7. 在目录下新建文件
8.添加到库,分支-test
命令 git add <filename>
9. 对文件做一些编辑,然后检查
命令 git diff
10. 提交所做的修改到库
命令 git commit <filename> -m <message>
11. 提交指定分支到远程库
命令 git push origin <branchname>
12. 在github上查看添加的分支
可以看到分支master里并没有test.txt,在test分支里有test.txt
13.删除分支
点击分支对应右侧的垃圾桶即可删除