github创建分支并提交代码至分支
登录自己的github,进入自己的仓库,点击下图所示

然后创建新的分支,输入新的分支名,回车

然后默认是直接进入这个分支,也可以点击进入分支,然后在本地文件夹下克隆自己的仓库地址,最后将文件全部复制到克隆下来的文件夹中,在这个文件夹中右击,点击git bash here,打开命令窗口

然后切换索要提交到分支上,git checkout 分支名

然后通过 git add . 将文件进行缓存添加到仓库,注意最后的点不能省略,添加成功后,会出现如下界面

git commit -m “提交说明”,这个说明是自己写的,可以是first

最后就是提交代码,git -u push origin ‘分支名’,其中会弹出让你输入github的用户名和密码,填写完毕后,即可完成提交。
