DevOps 组件部署 - Git

本文详细介绍了如何在Windows系统上下载、安装Git,并通过步骤演示了Git的部署过程,包括GitBash的使用和基本命令测试。

# DevOps

https://iothub.org.cn/docs/devops/
https://iothub.org.cn/docs/devops/deploy/deploy-git/

一、概述

官网地址

# 官网地址

https://git-scm.com/
https://git-scm.com/downloads

下载安装文件

https://git-scm.com/downloads

# windows
https://git-scm.com/download/win

# linux
https://git-scm.com/download/linux

在这里插入图片描述
在这里插入图片描述

二、Windows安装部署

1.下载安装文件

# 下载版本

Git-2.31.1-64-bit.exe

2.安装Git

1.查看 GNU 协议,可以直接点击下一步

在这里插入图片描述

2.选择 Git 安装位置,要求是非中文并且没有空格的目录,然后下一步

在这里插入图片描述

3.Git 选项配置,推荐默认设置,然后下一步

在这里插入图片描述

4.Git 安装目录名,不用修改,直接点击下一步
在这里插入图片描述

5.Git编译器,不用修改,直接点击下一步

在这里插入图片描述

6.默认分支名设置,选择让 Git 决定,分支名默认为 master,下一步

在这里插入图片描述

7.Git环境变量,不用修改,直接点击下一步

在这里插入图片描述

8.选择后台客户端连接协议,选默认值 OpenSSL,然后下一步
在这里插入图片描述

9.配置 Git 文件的行末换行符,Windows 使用 CRLF,Linux 使用 LF,选择第一个自动 转换,然后继续下一步

在这里插入图片描述

10.选择 Git 终端类型,选择默认的 Git Bash 终端,然后继续下一步

在这里插入图片描述

11.选择 Git pull 合并的模式,选择默认,然后下一步

在这里插入图片描述

12.选择 Git 的凭据管理器,选择默认的跨平台的凭据管理器,然后下一步

在这里插入图片描述

13.其他配置,选择默认设置,然后下一步

在这里插入图片描述

14.实验室功能,技术还不成熟,有已知的 bug,不要勾选,然后点击右下角的 Install

按钮,开始安装 Git

在这里插入图片描述

15.点击 Finsh 按钮,Git 安装成功

在这里插入图片描述

3.测试

右键任意位置,在右键菜单里选择 Git Bash Here 即可打开 Git Bash 命令行终端。

在这里插入图片描述

在 Git Bash 终端里输入 git --version 查看 git 版本,如图所示,说明 Git 安装成功。

在这里插入图片描述

$ git
usage: git [--version] [--help] [-C <path>] [-c <name>=<value>]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           <command> [<args>]

These are common Git commands used in various situations:

start a working area (see also: git help tutorial)
   clone             Clone a repository into a new directory
   init              Create an empty Git repository or reinitialize an existing one

work on the current change (see also: git help everyday)
   add               Add file contents to the index
   mv                Move or rename a file, a directory, or a symlink
   restore           Restore working tree files
   rm                Remove files from the working tree and from the index
   sparse-checkout   Initialize and modify the sparse-checkout

examine the history and state (see also: git help revisions)
   bisect            Use binary search to find the commit that introduced a bug
   diff              Show changes between commits, commit and working tree, etc
   grep              Print lines matching a pattern
   log               Show commit logs
   show              Show various types of objects
   status            Show the working tree status

grow, mark and tweak your common history
   branch            List, create, or delete branches
   commit            Record changes to the repository
   merge             Join two or more development histories together
   rebase            Reapply commits on top of another base tip
   reset             Reset current HEAD to the specified state
   switch            Switch branches
   tag               Create, list, delete or verify a tag object signed with GPG

collaborate (see also: git help workflows)
   fetch             Download objects and refs from another repository
   pull              Fetch from and integrate with another repository or a local branch
   push              Update remote refs along with associated objects

'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.
See 'git help git' for an overview of the system.
# DevOps

https://iothub.org.cn/docs/devops/
https://iothub.org.cn/docs/devops/deploy/deploy-git/
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

IoTHub - 物联网开源技术社区

支持开源技术! 传播开源文化!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值