Linux 版本 : Linux-4.4.0 使用 Ubuntu 虚拟机
本文介绍内容:
- 安装git工具
- 安装SSH密钥
- 创建git hub远程仓库
- 使用git clone从远程仓库下载文件
- 本地创建hello_world.c文件 并将文件同步到远程仓库
1.安装git 工具
使用apt安装git.
root@xl-virtual-machine:/home/xl# apt install git
安装成功后输入git如下图:
root@xl-virtual-machine:/home/xl# git
usage: git [--version] [--help] [-C <path>] [-c name=value]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
<command> [<args>]
配置用户邮箱和用户名
git config --global user.email "you@example.com"
git config --globa