git 短写设置_如何在短短几分钟内设置一个Git客户端

git 短写设置

Today we’re going to talk about Git. You’re going to learn what Git is and how to set up a Git client on your computer.

今天我们将讨论Git。 您将学习什么是Git,以及如何在计算机上设置Git客户端。

什么是Git? (What is Git?)

Imagine you’re playing a game. In this game, you can create save points. When you die in the game, you need to load your game and continue from your save point.

假设您正在玩游戏。 在这个游戏中,您可以创建保存点。 当您死于游戏中时,您需要加载游戏并从保存点继续。

If you didn’t create a save point, you would start all the way at the beginning of the game again. That’s not a fun experience, so it's always a good idea to save your game.

如果未创建保存点,则将在游戏开始时重新开始。 那不是一个有趣的经历,因此保存游戏始终是个好主意。

Git is like a save point system for your work. You can create save points. In Git we call each save point a commit.

Git就像是您工作的保存点系统。 您可以创建保存点。 在Git中,我们将每个保存点称为一次提交。

When you create a commit in Git, you can load your work from that commit. If you create five commits, you can load your work from any of these commits.

在Git中创建提交时,可以从该提交中加载工作。 如果创建五个提交,则可以从任何这些提交中加载工作。

That’s what Git is for. We call it a version control system, because you can save and load your work from any commit.

这就是Git的目的。 我们称其为版本控制系统,因为您可以从任何提交中保存和加载您的工作。

选择一个Git客户 (Choosing a Git Client)

Many people teach you how to use Git with a command line, but that can be scary for beginners.

很多人教你如何在命令行中使用Git,但这对于初学者来说可能会很恐怖。

We’re going to throw away the command line and use applications to help you get started with Git. These applications are also known as Git clients.

我们将抛弃命令行,使用应用程序来帮助您开始使用Git。 这些应用程序也称为Git客户端。

My favorite Git Client is Tower. It is extremely powerful. The only downside to Tower is it costs $55.20 each year. If you’re new to programming, you might not want to start with Tower. You might want to try a free application instead.

我最喜欢的Git客户是Tower 。 它非常强大。 塔的唯一缺点是它每年花费$ 55.20。 如果您不熟悉编程,则可能不希望从Tower开始。 您可能想尝试一个免费的应用程序。

Here are some good free apps:

以下是一些不错的免费应用程序:

  1. Sourcetree

    源树

  2. GitKraken

    吉特·克拉肯

  3. Fork

    叉子

Sourcetree is probably the best free app out there. It is good and has features on par with Tower. But Sourcetree can be buggy, and you might not be able to resolve the errors yourself. (I tried, and I couldn’t).

Sourcetree可能是那里最好的免费应用程序。 很好,并且具有与Tower相当的功能。 但是Sourcetree可能有问题,您可能无法自己解决错误。 (我尝试过,但不能)。

GitKraken is another popular app that many people like. I believe GitKraken is too fancy, and focuses on the wrong things, though.

GitKraken是许多人喜欢的另一个受欢迎的应用程序。 我相信GitKraken太花哨了,尽管专注于错误的事情。

Fork looks clean and simple and is pretty good to get started with. It’s in beta right now, so its free, but you might need to pay for it later.

叉子看上去干净简单,很容易上手。 它目前处于测试阶段,因此它是免费的,但是您稍后可能需要付费。

I’m going to show you how to setup Fork.

我将向您展示如何设置Fork。

设置叉 (Setting up Fork)

Here’s the Welcome screen when you open up Fork for the first time:

首次打开Fork时,这是“欢迎”屏幕:

It will ask you for your user name and your email address. These are used for identification purposes for advanced uses when there are multiple people working on the same project.

它将询问您的用户名和电子邮件地址。 当有多个人在同一个项目上工作时,这些用于识别目的以供高级使用。

“User name” is a bit misleading, because this should be your name, not an actual username.

“用户名”有点误导,因为这应该是您的名字,而不是实际的用户名。

默认源目录 (The default source directory)

One thing I like about Fork is it asks you to set a default source directory.

我喜欢Fork的一件事是,它要求您设置默认的源目录。

This means the projects you copy (or clone) with Git will automatically go into the specified folder, which makes it easy to find.

这意味着您使用Git复制(或克隆)的项目将自动进入指定的文件夹,这很容易找到。

初始化一个Git仓库 (Initializing a Git repository)

There are two ways to create a Git repository.

有两种创建Git存储库的方法。

Before you create a Git repository, you’ll want to create a project folder in your source directory. Once you have a folder in your source directory, you can click on File then Create new repository in Fork to create your Git directory.

在创建Git存储库之前,您需要在源目录中创建一个项目文件夹。 一旦您的源目录中有一个文件夹,您可以单击File然后在Fork中Create new repository以创建您的Git目录。

To check whether the Git repository is created, you can open up the project folder and check for a .git folder. This .git folder is a hidden folder. You need to show your hidden files to see it.

要检查是否创建了Git存储库,可以打开项目文件夹并检查.git文件夹。 .git文件夹是一个隐藏的文件夹。 您需要显示隐藏文件才能看到它。

The second way to initialize a Git repository is through the command line.

初始化Git存储库的第二种方法是通过命令行。

To do so, you’d first want to create your project folder in your source directory. Then, you drag your project folder into the Terminal app. This will automatically navigate you to the project folder in the Terminal.

为此,您首先要在源目录中创建项目文件夹。 然后,将项目文件夹拖到“终端”应用程序中。 这将自动将您导航到终端中的项目文件夹。

If you want to learn more about the Terminal, I recommend starting with my article on overcoming your fear of the command line.

如果您想了解有关终端的更多信息,我建议您从克服有关命令行的恐惧的文章开始。

Once you have navigated yourself to the project folder in the terminal, you can type git init to initialize the repository.

导航到终端中的项目文件夹后,可以键入git init初始化存储库。

git init

结语 (Wrapping up)

Git is like a save-point system in games. You can use Git to save and load your work.

Git就像游戏中的保存点系统。 您可以使用Git保存和加载您的工作。

Thanks for reading. Did this article help you in any way? If I did, I hope you consider sharing it. You might just help someone who felt the same way you did before reading the article. Thank you.

谢谢阅读。 本文对您有任何帮助吗? 如果我愿意 , 希望您考虑与他人分享 。 在阅读本文之前,您可能只是帮助一个感觉与您相同的人。 谢谢。

This article was originally posted on my blog. Sign up for my newsletter if you want more articles to help you become a better front-end developer.

本文最初发布在我的博客上 。 如果您想要更多文章来帮助您成为更好的前端开发人员,请注册我的新闻通讯 。

翻译自: https://www.freecodecamp.org/news/how-to-set-up-a-git-client-in-just-a-few-minutes-3d78b8d2264f/

git 短写设置

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/393463.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

P1977 出租车拼车

P1977 出租车拼车 题目背景 话说小 x 有一次去参加比赛,虽然学校离比赛地点不太远,但小 x 还是想坐 出租车去。大学城的出租车总是比较另类,有“拼车”一说,也就是说,你一个人 坐车去,还是一堆人一起&#…

leetcode1011. 在 D 天内送达包裹的能力(二分查找)

传送带上的包裹必须在 D 天内从一个港口运送到另一个港口。 传送带上的第 i 个包裹的重量为 weights[i]。每一天,我们都会按给出重量的顺序往传送带上装载包裹。我们装载的重量不会超过船的最大运载重量。 返回能在 D 天内将传送带上的所有包裹送达的船的最低运载…

java集合概念_JAVA集合概念

Java集合是使程序能够存储和操纵元素不固定的一组数据。 所有Java集合类都位于java.uti包中。与Java数组不同,Java集合中不能存放基本数据类型,只能存放对象的引用。但是在JDK5.0以后的版本当中,JAVA增加了“自动装箱”和“自动拆箱”的机制&…

项目计划总结

项目计划总结 任务 日期 听课(min) 编程(min) 阅读课本(min) 日总结(min) 2017/3/13 120 70 190 2017/3/14 80 80 2017/3/15 90 30 120 2017/3/16 …

HTML5新特性之Mutation Observer

Mutation Observer(变动观察器)是监视DOM变动的接口。当DOM对象树发生任何变动时,Mutation Observer会得到通知。 要概念上,它很接近事件。可以理解为,当DOM发生变动会触发Mutation Observer事件。但是,它与…

leetcode230. 二叉搜索树中第K小的元素(中序遍历)

给定一个二叉搜索树,编写一个函数 kthSmallest 来查找其中第 k 个最小的元素。说明: 你可以假设 k 总是有效的,1 ≤ k ≤ 二叉搜索树元素个数。示例 1:输入: root [3,1,4,null,2], k 13/ \1 4\2 输出: 1解题思路 变量 cnt:统计已经按序遍…

Python操作MongoDB - 极简教程

2019独角兽企业重金招聘Python工程师标准>>> Python 连接 MongoDB 安装PyMongo模块 pip install pymongo使用MongoClient建立连接 from pymongo import MongoClient # 以下为三种建立连接的方式 #client MongoClient() #client MongoClient(localhost, 27017) #cl…

nuxt.js的核心代码_Nuxt.js中的通用应用程序代码结构

nuxt.js的核心代码by Krutie Patel通过克鲁蒂帕特尔(Krutie Patel) Nuxt.js中的通用应用程序代码结构 (Universal application code structure in Nuxt.js) Nuxt.js中的源代码结构的简要摘要 (A brief summary of source code structure in Nuxt.js) Are you new to the Nuxt.…

java 省市区三级联动_AJAX省市区三级联动下拉菜单(java版)

此小程序的功能主要是采用异步请求方式从数据库中调取省市区信息显示到下拉列表:代码如下:建立数据库中的代码和一些配置文件信息就省略了,主要有JavaScript中的代码为:$(document).ready(function(){$.get("getProvince.do&…

20155305乔磊2016-2017-2《Java程序设计》第四周学习总结

20155305乔磊2016-2017-2《Java程序设计》第四周学习总结 教材学习内容总结 继承 继承就是避免多个类间重复定义共同行为。面向对象中,子类继承父类,就是把程序中相同的代码部分提升为父类。extends关键字,表示前者会扩充后者的行为&#xff…

leetcode29. 两数相除(位运算)

给定两个整数,被除数 dividend 和除数 divisor。将两数相除,要求不使用乘法、除法和 mod 运算符。 返回被除数 dividend 除以除数 divisor 得到的商。 整数除法的结果应当截去(truncate)其小数部分,例如:…

【eclipse转idea的第一天】配置idea

为什么80%的码农都做不了架构师?>>> 导入maven项目 设置maven(全局) 为了不然才转idea的码友们重复我犯过的错,我这儿截图步骤说明下: 这里是列表文本这里是列表文本idea的设置有两种:全局,局部(我这么叫的…

node.js web框架_使用Node.js进行Web爬取的终极指南

node.js web框架So what’s web scraping anyway? It involves automating away the laborious task of collecting information from websites.那么,什么是网络抓取? 它涉及自动化从网站收集信息的艰巨任务。 There are a lot of use cases for web s…

java局部内部类 final_Java的局部内部类以及final类型的参数和变量

Thinking In Java里面的说法(***正确的说法): 如果定义一个匿名内部类,并且希望它使用一个在其外部定的对象,那么编译器会要求其参数引用是final 的。publicclassTester {publicstaticvoidmain(String[] args) {A a newA();C c newC();c.shou…

Vmware 安装虚拟工具 (二)

打开虚拟机,以root超级用户登陆,菜单栏选择虚拟机,install安装虚拟机 拷贝虚拟工具到 在根目录下建立文件夹,并将工具拷贝到该文件夹,例如vmtool 打开终端,进入该目录开始安装 如图,进入目录解压…

git与svn的区别 ?Git 与 SVN那个更好?

git与svn的区别 : http://www.360doc.com/content/12/1228/20/11220452_256857021.shtml 在版本控制系统的选型上,是选择Git还是SVN? 对于开源项目来说这不算问题。使用Git极大地提高了开发效率、扩大了开源项目的参与度、 增强了版本控制系统…

强化学习简介

by ADL通过ADL Reinforcement Learning is an aspect of Machine learning where an agent learns to behave in an environment, by performing certain actions and observing the rewards/results which it get from those actions.强化学习是机器学习的一个方面&#xff0…

leetcode1111. 有效括号的嵌套深度(栈)

给你一个「有效括号字符串」 seq,请你将其分成两个不相交的有效括号字符串,A 和 B,并使这两个字符串的深度最小。 不相交:每个 seq[i] 只能分给 A 和 B 二者中的一个,不能既属于 A 也属于 B 。 A 或 B 中的元素在原字…

利用Arcgis for javascript API绘制GeoJSON并同时弹出多个Popup

1.引言 由于Arcgis for javascript API不可以绘制Geojson,并且提供的Popup一般只可以弹出一个,在很多专题图制作中,会遇到不少的麻烦。因此本文结合了两个现有的Arcgis for javascript API扩充库,对其进行改造达到绘制Geojson并同…

java 线程简介_java多线程介绍

java多线程介绍多线程的基本实现进程指运行中的程序,每个进程都会分配一个内存空间,一个进程中存在多个线程,启动一个JAVA虚拟机,就是打开个一个进程,一个进程有多个线程,当多个线程同时进行,就…