Git 安装

一、下载安装包

Git官网 https://git-scm.com/
Git 阿里镜像

二、安装

点击安装包运行,基本上一路 next 就行。

  1. 使用许可声明
  2. 选择安装目录
  3. 选择组件,默认勾选就行
  4. 选择开始菜单文件夹,默认就行
  5. 选择 Git 的默认编译器,默认 Vim 就行
  6. 调整新存储库的初始化分支名称,默认 master 就行
  7. 调整环境变量,默认就行
  8. 选择 SSH 可执行文件,默认就行
  9. 选择 HTTPS 后端传输,默认就行
  10. 配置行尾符号转换,默认就行
  11. 配置终端模拟器与 Git Bash 一起使用,默认就行
  12. 选择 'git pull' 默认行为,默认下一步
  13. 选择一个凭证帮助程序,默认就行
  14. 配置额外选项,默认就行
  15. 配置实验选项,一般不选,默认就行,直接安装
  16. 安装成功,可以查看版本说明

三、Git简易命令

  • Git 全局设置
js 复制代码
git config --global user.name "鱼钓猫"
git config --global user.email "[email protected]"
  • 创建 Git 仓库
js 复制代码
mkdir fishcat
cd fishcat
git init 
touch README.md
git add README.md
git commit -m "first commit"
git remote add origin https://gitee.com/fish-fishing-cats/fishcat.git
git push -u origin "master"
  • 已有仓库?
js 复制代码
cd existing_git_repo
git remote add origin https://gitee.com/fish-fishing-cats/fishcat.git
git push -u origin "master"

参考 https://blog.csdn.net/qq_45281589/article/details/134650456,里面有非常详细的 Git 教程。

相关推荐
Muen1 小时前
git使用
git
yyangqqian1 小时前
Git 之配置ssh
git
tanactor9 小时前
Git入门——常用指令汇总
git
Auroral15614 小时前
Git提交规范
git
琳沫lerlee1 天前
【Git多分支使用教程】
git·多分支
郭源潮11 天前
《Git:基本命令使用》
git
三金C_C1 天前
.git 文件夹
git
小黑爱编程1 天前
【git】认识git的本地仓库
git
工会代表1 天前
在 Git 中彻底消除 .DS_Store 文件
git·github
小蒋同学1 天前
Git环境配置
git