第一次git_Git第一次设置

第一次git

Git is a Free and Open Source Distributed Version Control System.

Git是一个免费的开源分布式版本控制系统。

By far, Git is the most widely used modern version control system in the world today. Git is a distributed and actively maintained open source project originally developed in 2005 by Linus Torvalds, the famous creator of the Linux operating system kernel.

到目前为止,Git是当今世界上使用最广泛的现代版本控制系统。 Git是一个分布式且积极维护的开源项目,最初由Linux操作系统内核的著名创建者Linus Torvalds于2005年开发。

Unlike older centralized version control systems such as SVN and CVS, Git is distributed: every developer has the full history of their code repository locally. Git also works well on a wide range of operating systems and IDEs (Integrated Development Environments).

与SVN和CVS等较旧的集中版本控制系统不同,Git是分布式的:每个开发人员都在本地拥有其代码存储库的完整历史记录。 Git在各种操作系统和IDE(集成开发环境)上也能很好地工作。

In this article, I’ll show you how to install Git, set it up for the first time, useful tips and resources to learn more/ learn advanced git concepts. Let’s roll!

在本文中,我将向您展示如何安装Git,如何进行首次安装,有用的技巧和资源以了解更多信息/学习高级git概念。 来吧!

I assume you already know what Version control is, if you don’t, kindly check out this slide to learn more.

我假设您已经知道什么是版本控制,如果不知道,请查看此幻灯片以了解更多信息。

Here’s a quick recap of what Version control means: Version Control is: the process of managing changes to source code or set of files over time.

下面简要回顾了Version Control的含义:Version Control是:管理源代码或文件集随时间变化的过程。

Version control is the process of managing changes to source code or set of files over time.

版本控制是随着时间的推移管理对源代码或文件集的更改的过程。

Version control software keeps track of every modification to the code in a special kind of database. If a mistake is made, developers can restore and compare earlier versions of the code to help fix the mistake while minimizing disruption to all team members or contributors.

版本控制软件会跟踪特殊数据库中对代码的每次修改。 如果犯了错误,开发人员可以还原并比较早期版本的代码,以帮助解决错误,同时最大程度地减少对所有团队成员或贡献者的破坏。



Now that you know what Version Control and Git mean, let’s install it.

现在您已经了解了Version Control和Git的含义,让我们安装它。

对于MAC OS:
(FOR MAC OS:)

Download Git for macOS or install using Homebrew

下载适用于macOS的Git或使用Homebrew安装

brew install git

对于LINUX操作系统:
(FOR LINUX OS:)

Download Git for Linux orInstall for Debian-based Linux systems

下载Linux版Git或基于Debian的Linux系统安装

sudo apt-get update
 sudo apt-get upgrade
 sudo apt-get install git

orInstall for Red Hat-based Linux systems

或针对基于Red Hat的Linux系统安装

sudo yum upgrade
 sudo yum install git

对于WINDOWS操作系统:
(FOR WINDOWS OS:)

Download Git for Windows

下载Windows版Git

这是针对GIT官方DOCS上不同系统的更详细的安装指南 (HERE’S A MORE DETAILED INSTALLATION GUIDE FOR DIFFERENT SYSTEMS ON GIT OFFICIAL DOCS)


Now that you have Git on your system, let’s set up the Git environment.Git comes with a tool called git config that lets you get and set configuration variables that control all aspects of how Git looks and operates.

现在您已经在系统上安装了Git,让我们设置Git环境.Git附带了一个名为git config的工具,您可以通过该工具获取和设置配置变量,以控制Git外观和操作的各个方面。

  • First set your identity, your name and email address like so:

    首先设置您的身份,姓名和电子邮件地址,如下所示:
git config --global user.name "bolajiayodeji"
 git config --global user.email mailtobolaji@gmail.com

the --global option makes sure these values are used throughout your system

--global选项可确保在整个系统中使用这些值

  • Next set up the default text editor you’ll use whenever you need to enter a message in Git. This is not compulsory, if you don’t configure this, Git will use your default editor. If you want to use something else, configure like so:

    接下来,设置需要在Git中输入消息时将使用的默认文本编辑器。 这不是强制性的,如果您不配置它,Git将使用您的默认编辑器。 如果您想使用其他东西,请像这样配置:
git config --global core.editor emacs
  • Next, set up colors for your Git console.

    接下来,为您的Git控制台设置颜色。

For Linux OS users, you can use third pary Zsh configurators like oh my zsh to customize your terminal look with themes :).To configure this, do this:

对于Linux OS用户,您可以使用第三方parse Zsh配置器(例如oh my zsh)以主题:)自定义终端外观。

git config --global color.ui true

The color.ui is a meta configuration that includes all the various color.* configurations available with git commands.

color.ui是一个元配置,其中包括git命令可用的所有各种color。*配置。

Now Git is ready for use.

现在,Git可以使用了。

检查您的设置 (CHECK YOUR SETTINGS)

git config --list
user.name=bolajiayodeji
 user.email=mailtobolaji@gmail.com
 color.ui=true


Want to learn some super Git commands?

想学习一些超级Git命令吗?

I wrote an article: Git Cheat Sheet that covers some important Git commands you’ll need.

我写了一篇文章: Git备忘单 ,其中涵盖了一些您需要的重要Git命令。

结论 (CONCLUSION)

Version control software is an essential part of the every-day of modern-day software developer practices. Once accustomed to the powerful benefits of version control systems, many developers wouldn’t consider working without it even for non-software projects.

版本控制软件是现代软件开发人员日常工作中必不可少的一部分。 一旦习惯了版本控制系统的强大功能,许多开发人员就不会考虑没有版本控制系统,即使对于非软件项目也是如此。

翻译自: https://www.freecodecamp.org/news/git-first-time-setup/

第一次git

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值