一, Git 安装教程
Git 安装比较简单, 选择好安装路径, 直接默认下一步即可
1: 检查 Git 是否安装成功
二, SourceTree 工具
1: 下载 https://www.sourcetreeapp.com/ & 安装
安装过程中如何免注册?
在 C:\Users\Administrator\AppData\Local\Atlassian\SourceTree 文件里放入新建 (或修改)accounts.JSON 并将以下内容复制到其中后保存.
- [
- {
- "$id": "1",
- "$type": "SourceTree.Api.Host.Identity.Model.IdentityAccount, SourceTree.Api.Host.Identity",
- "Authenticate": true,
- "HostInstance": {
- "$id": "2",
- "$type": "SourceTree.Host.Atlassianaccount.AtlassianAccountInstance, SourceTree.Host.AtlassianAccount",
- "Host": {
- "$id": "3",
- "$type": "SourceTree.Host.Atlassianaccount.AtlassianAccountHost, SourceTree.Host.AtlassianAccount",
- "Id": "atlassian account"
- },
- "BaseUrl": "https://id.atlassian.com/"
- },
- "Credentials": {
- "$id": "4",
- "$type": "SourceTree.Model.BasicAuthCredentials, SourceTree.Api.Account",
- "Username": "",
- "Email": null
- },
- "IsDefault": false
- }
- ]
- View Code
三, 把代码迁入到服务器上
1: 进入 source tree -> 文件 -> 克隆 / 新建 -> 创建仓库 -> 选择本机上的项目
.
创建完仓库后先不提交, 获取远程仓库的 url(这里暂时使用 GitHub 创建的仓库)
配置远端服务器地址
四, 正式搭建
地址: http://tfs.yango.com.cn
1: 先使用 Gogs 在该地址上创建一个仓库.
2: 按照上面的步骤创建和配置
来源: http://www.bubuko.com/infodetail-2955978.html