基本规则
仓库/repository,分支/branch仓库是网页、代码、资料等在GitHub网站存放位置
repository下有branch,branch默认为master,用户需根据自身需要自建新的branch
登陆页面后,跳转到“Learn Git and GitHub without any code!”页面,点击“Start a project”按钮,跳转到“Create a new repository”页面,在“Repository name”输入框输入仓库名称
仓库名称规则:用户名.github.io,用户名同登陆用户名,小写,针对有网站发布需求的使用,其它应用则根据自身喜好即可
“Description”输入框输入此仓库的基本用途相关的描述信息
一定要选“Public”,因为“Private”是收费的
“Initialize this repository with a README”是可选项目,一般勾选,“Add gitignore”和“Add a license”初学者用不到,默认选“NONE”
点击“Create repository”按钮,创建完成,跳转到“用户名/仓库名”页面
建仓库
网站刚刚注册、登陆、没有进行任何项目操作的样子
点击“Start a project”,进行新建仓库操作
登陆GitHub网站的账户下,仓库信息
GitHub网站首页,仓库信息
删除仓库
在这个界面下,点击“Settings”
点击底部“Danger zone”中的“Delete this repository”
删除仓库后的样子
建分支
点击“Branch master”按钮
在输入框中输入要创建的分支的名称new-branch,点击“Create branch: new-branch”
new-branch分支创建完成并切换
点击“Branch new-branch”,查看/切换分支
删除分支
仓库Helloworld下有个分支new-branch
点击“x branches”,查看仓库Helloworld下的分支情况
点击“垃圾桶”图标,进行删除
刷新页面,可清晰看到分支删除状态
“Code”界面下,分支删除状态
打开GitHub客户端,此功能需在Firefox浏览器中操作,其它浏览器IE/chrome等默认不能用,解决也相当麻烦
在如下界面中,点击“Clone or download”,点击“Open in desktop”下载仓库文件
在如下界面中,点击“Clone or download”,点击“Download zip”