zoukankan      html  css  js  c++  java
  • 343 git基础入门:git的安装,git config配置,git三个区

    Git是一款免费、开源的分布式 版本控制系统 ,用于敏捷高效地处理任何或小或大的项目。

    Git 是 Linus Torvalds 为了帮助管理 Linux 内核开发而开发的一个开放源码的版本控制软件。

    【Git用于管理本都仓库。】


    git的安装

    下载地址

    注意:

    1. 不要安装在中文目录
    2. 不要使用桌面管理软件

    安装很简单,一直下一步即可。在任意的目录下右键,能看到菜单, 就表示安装成功了。

    注册码云(远程git仓库)账号:

    ​ 地址: https://gitee.com/signup


    git 中文转义处理

    1. 尝试修改 右键 -- Options -- Text --Character set 选中UTF-8
      无效
    2. 使用git 命令 $ git config --global core.quotepath false
      有效果

    git config配置

    如果是第一次提交,需要配置提交者信息,推荐和gitee的账号邮箱一致

    # git config  user.name 你的目标用户名
    # git config  user.email 你的目标邮箱名
    
    # 使用--global参数,配置全局的用户名和邮箱,只需要配置一次即可。推荐配置gitee的用户名和密码
    git config  --global user.name Jepson
    git config  --global user.email jepsonpp@qq.com
    
    # 查看配置信息
    git config --list
    
    # 重置
    git config --unset --global user.name
    git config --unset --global user.email
    


    git三个区

    初始化git仓库

    要对某个项目使用git进行管理,需要使用git init命令初始化git仓库
    git init会在当前目录生成一个隐藏文件夹 .git ,不要去修改这个文件夹下的任意东西。

    git仓库会分成三个区:

    工作区:我们书写代码的地方,工作的目录就叫工作区。

    暂存区:暂时存储的区域,在git中,代码无法直接从工作区提交到仓库区,而是需要先从工作区添加到暂存区,然后才能从暂存区提交到仓库区。暂存区的目的是避免误操作。

    本地仓库区:将保存在暂存区域的内容永久转储到 Git 仓库中,生成版本号。生成版本号之后,就可以任意地回退到某一个具体的版本。

  • 相关阅读:
    [LeetCode]2. Add Two Numbers链表相加
    Integration between Dynamics 365 and Dynamics 365 Finance and Operation
    向视图列添加自定义图标和提示信息 -- PowerApps / Dynamics365
    Update the Power Apps portals solution
    Migrate portal configuration
    Use variable to setup related components visible
    Loyalty management on Retail of Dynamic 365
    Modern Fluent UI controls in Power Apps
    Change screen size and orientation of a canvas app in Power App
    Communication Plan for Power Platform
  • 原文地址:https://www.cnblogs.com/jianjie/p/12404389.html
Copyright © 2011-2022 走看看