【Git】从零开始学习Git 1:简介和创建账户

我发现我其实现在也不太懂git,刚好学校给我的canvas里加了这个bootcamp让同学们自学,所以学习一下自己做个笔记。也希望这篇笔记对和我一样情况的同学有所帮助。

section 0:  What is version control?

什么是版本控制?

A version control system records changes to a set of files over time. The changes to the files over time are called the history. Using a history database, you can retrieve specific, previous
versions of the files. 一个版本控制系统将会记录你对一系列文件所做出的全部更改。使用一个档案记录数据库,你可以将某个文件回溯到之前的状态,将整个项目回退到过去某个时间点的特定的状态。

使用版本控制的优点与缺点?

优点:1)If a bug is discovered, you can revert to a working version. 如果发现了一个bug,你可以将程序回退到一个能够正常工作的状态。 2)Discover which specific change caused a bug. 能够知道哪次更改造成了bug。 3)Discover which developer caused the bug. 方便知道谁造了bug。 4)Review code during collaboration. 方便合作来review code。

缺点:NONE THAT MATTER. 没有那回事啦。

Git vs. GitHub/GitLab/Etc.

Git:The backend that runs on clients and servers to support the databases. 直译的话就是在客户端和服务器上运行以支持数据库的后端。

GitHub, GitLab, etc.:Web interfaces for Git on servers. 服务器上 Git 的 Web 界面。

GitHub vs. BitBucket vs. GitLab

GitHub:Cloud hosting only. No on-site self-hosting.

BitBucket:Cloud hosting. Paid on-site self-hosting available.

GitLab:Open source with free on-site self hosting. Cloud hosting available.
 

section 1: Git Setup

Step 1: Installing Git. 安装Git,对于不同操作系统,对应的Git版本都可以在 https://github.com/git-guides/install-git 找到。学习command line clien的话,必须先要验证它已经被正确安装了。可以在终端中输入 git version来确认。

Step 2: Creating a GitHub Account. 在 https://github.com/join 创建新用户。一个账号可以绑定多个邮箱,但一个邮箱不能绑定多个账号。

Step 3: Recommended First-Time Setup. 第一次setup,除非有其他的偏好, 不然使用Github的用户名的邮箱来identify。使用以下命令行:
$ git config --global user.name xxxx
$ git config --global user.email xxx@xxx.com

Step 4: Connecting to GitHub Securely. 安全连接到Github上。这一步需要SSH authentication。相关操作可以在 链接🔗里查看。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值