Coursera 笔记

Module 04 · [Optional] Working with GitHub from Your Windows Desktop在 Windows 桌面使用 GitHub(可选)

Using Git Commands from your Desktop (Optional)在桌面使用 Git 命令(可选)

Coursera ↗

In the previous labs you used a Cloud-based IDE to work with Git commands. In many cases, you will be developing code on your own workstation on your desktop/laptop. Linux systems typically come pre-installed with Git commands or if needed you can install them using dnf on rpm based distributions (e.g. Red Hat / Fedora):
在之前的实验中,您使用基于云的 IDE 来操作 Git 命令。在许多情况下,您将在自己的工作站上(桌面/笔记本电脑)开发代码。Linux 系统通常预装了 Git 命令,或者在需要的情况下,您可以使用 dnf 在基于 rpm 的发行版(例如 Red Hat / Fedora)上安装它们:

sudo dnf install git-all

or, apt on Debian-based distributions (e.g. Ubuntu):

sudo apt install git-all

On MacOS you can activate Git by typing:

git version

However if it is not installed, or if you want to update it, you can download and install the latest version of the MacOS Git Installer, and run the above command to verify the version.
然而,如果没有安装,或者您想更新它,您可以下载并安装最新的 MacOS Git 安装程序,然后运行上述命令以验证版本。

On Windows based systems, you can install Git Bash by downloading the Git for Windows installer. Git Bash includes popular Linux Bash shell commands (such as ls, pwd, cat, etc.) as well as Git commands.
在基于 Windows 的系统上,您可以通过下载 Git for Windows 安装程序来安装 Git Bash。Git Bash 包括流行的 Linux Bash shell 命令(如 ls、pwd、cat 等)以及 Git 命令。

You can also get the GitHub desktop for Windows and MacOS, which provides a UI for GitHub on your desktop.
您还可以获取适用于 Windows 和 MacOS 的 GitHub 桌面版,它为您的桌面提供了 GitHub 的用户界面。

When you are working with GitHub repositories from your desktop you will also need to setup an ssh key.
当你使用桌面上的 GitHub 仓库时,你还需要设置一个 SSH 密钥。

The remaining labs in this module are optional however recommended for those with a Windows desktop. In the following labs you will install Git Bash on your Windows machine, and configure an ssh key to work with your GitHub repo using Git commands on your system.
剩余的实验室在这个模块中是可选的,但推荐 Windows 桌面用户进行。在接下来的实验室中,您将在 Windows 机器上安装 Git Bash,并使用系统上的 Git 命令配置 ssh 密钥以与 GitHub 仓库协同工作。