- 打开 App Store
- 搜索 SourceTree
- 点击“获取”进行安装
- 打开 SourceTree
- 确定 Bookmarks 窗口已打开,菜单:View > Show Bookmarks
- 右键菜单:New > Repository…
- 在 Clone Repository 中,点击“地球”图标
- 点击“Edit Accounts...”按钮
- 点击“Add Account...”按钮
- 输入或选择以下设置:
- i. Hosting Service: GitHub
- ii. Host URL: https://github.com
- iii. Username:
- xi. Preferred protocol: HTTPS
- xii. Show private repositories: 选中
- 点击“OK”,你会看到你的账号显示在列表中
- 点击“Close”,你会看到你在GitHub中创建的项目
- 选中相应的项目,点击“Create New Repository”
- 指定Destination Path至本地工作路径
- 点击“Clone”
- 确定 Bookmarks 窗口已打开,菜单:View > Show Bookmarks
- 在刚才创建的代码库上点击右键菜单:Show in Finder
- 编辑README.md,为了方便预览,我用 Mou 来编辑 MD 文档。
- 确定 Bookmarks 窗口已打开,菜单:View > Show Bookmarks
- 在刚才创建的代码库上点击右键菜单:Open
- 切换至 Log View,菜单 View > Log View
- 选中刚才编辑的 README.md,可以在右下角进行预览
- 点击“Commit”按钮
- 在 Commit message 文本框中输入备注:通过 SourceTree 提交README.md文档。
- 点击“Commit”按钮
- 查看 master 分支
- 在左边 BRANCHES 菜单的右边,点击 Show
- 你可以看到 master 分支,以及你修改的历史和 README.md 文档
- 点击 Push 图标,或者使用菜单:Repository > Push…
- 确认选择 origin 代码库
- 勾选 master 分支
- 点击 OK 按钮
- 菜单:View > Show Hosted Repositories
- 选择此项目 LearnGit,点击右键
- 点击 Open in Browser...