GitHub 相对于其他平台还是比较友好的,自带一个 Gui 软件,省去了敲命令的力气。
本篇教程送给我的室友。
注册一个 Github 账号
使用 GitHub 首先得拥有一个账号,
前往 Join GitHub · GitHub 注册账号,按照他的提示来就行,比平常的网站注册要花里胡哨一点点。
邮箱用 QQ+@qq.com 比如 23333@qq.com 这种就行。
里面的词汇都比较简单,如果看不懂可以用浏览器自带的翻译器。
下载 Github Desktop
前往 GitHub Desktop | Simple collaboration from your desktop 下载 Github Desktop
若官网下载太慢,可以在 联想软件商店 之类的软件里下载

下载完后也是常规软件的安装方式。安装完后打开。
登录你的 Github 账号
第一次打开软件应该会直接让你登录 GitHub 账号,按照他的引导步骤登录就行。
如果没有找到让你登录 GitHub 账号的地方,你需要在 File -> Options -> Accounts -> Sign in 登录。

新建一个 Respiratory(项目)
respiratory n. 贮藏室,仓库;知识库;智囊团,在这类我们直接称为项目就好
第一步
点击红色方框内区域

第二步
点击红色方框所框选的按钮 “Add” -> 选择 Create new respiratory…

第三步 填写项目信息

Git ignore 暂时不用管,用于存储忽略上传到 git 的规则的文件,感兴趣 Git忽略文件.gitignore的使用 - 简书 (jianshu.com)
License 暂时不用管,建议选择 MIT License,感兴趣了解 各种开源协议介绍 | 菜鸟教程 (runoob.com)
完成项目初始化 ,此时你的项目还仅仅留在你的电脑上,并没有上传到 Github 这个平台上。

点击深蓝色的 Publish repository 按钮后确认信息,再点击弹出窗口中的深蓝色的 Publish repository 按钮就可以将项目上传到 Github 上。
取消选择 Keep this code private 可以让别人看到自己的项目。

编写代码
点击 Show in Explorer 可以直接打开项目目录

在目录中新建项目文件并编写代码

回到 Github Desktop 中就能看到刚刚编写好的代码文件。

将你的代码上传到 Github
填写 Commit 后点击深蓝色 Commit to main 按钮就可以提交你的代码。

点击红框中的 Push origin,就能把你刚刚提交的代码上传至 Github了

结束! 祝贺你已经学会使用 Github Desktop 的最基本操作了。
本文作者:折影轻梦
本文链接:https://nexmoe.com/3VXH932.html
版权声明:本文采用 CC BY-NC-SA 3.0 CN 协议进行许可
网友评论