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 短写设置

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

  1. 开源短地址_如何在短短5分钟内完成您的第一个开源贡献

    开源短地址 by Roshan Jossey 罗珊·乔西(Roshan Jossey) 如何在短短5分钟内完成您的第一个开源贡献 (How to make your first open source ...

  2. k8s aws 部署_如何在短短30分钟内使用CircleCI设置到AWS S3的持续部署

    k8s aws 部署 by Adam Watt 通过亚当·瓦特 如何在短短30分钟内使用CircleCI设置到AWS S3的持续部署 (How to setup Continuous Deployme ...

  3. 使用 ChatGPT 在短短 5 分钟内创建您的个人简历网站(并免费托管)

    在这篇博文中,我们将向您展示如何使用 ChatGPT 这种强大的语言模型,在短短 5 分钟内创建一个个人简历网站.我们还将向您展示如何在 ChatGPT 的帮助下免费托管您的网站! 在当今的数字时代, ...

  4. 使用Docker在5分钟内设置一个私有密码库

    收回隐私 (Taking Privacy Back) Github Repo here! Github回购在这里 ! With everything happening in the world ma ...

  5. 机器人坐标系建立_如何在30分钟内建立一个简单的搜索机器人

    机器人坐标系建立 by Quinn Langille 奎因·兰吉尔(Quinn Langille) 如何在30分钟内建立一个简单的搜索机器人 (How to Build A Simple Search ...

  6. bootstrap设计登录页面_前端小白如何在10分钟内打造一个爆款Web响应式登录界面?...

    对于前端小白(例如:专注后端代码N年的攻城狮),自己编写一个漂亮的Web登录页面似乎在设计上有些捉襟见肘,不懂UI设计,颜色搭配极度的混乱(主色,辅助色,配色,色彩渐变,动画效果等等,看起来一堆乱七八 ...

  7. git 只merge部分_[Skill]俩小时掌握多人开发中git的主要用法

    前言 几个月前看完了git文档,但是在实际开发中对很多git命令的具体影响仍有疑惑,比方说pull.fetch和rebase三个命令和检出位置拎不清. Git - Book​git-scm.com 安 ...

  8. git推送密码_保护代码完整性(六):在 Git 上使用 PGP

    我们继续我们的 PGP 实践系列,来看看签名标签的标签和提交,这可以帮你确保你的仓库没有被篡改. 在本系列教程中,我们提供了一个使用 PGP 的实用指南,包括基本概念和工具.生成和保护你的密钥.如果你 ...

  9. mumu模拟器cpu设置_网易MuMu模拟器CPU虚拟化怎么设置?

    网易MuMu模拟器CPU虚拟化怎么设置?网易MuMu模拟器CPU虚拟化如何开启?今天小编就为大家带来网易MuMu模拟器CPU虚拟化设置方法,一起来看看网易MuMu模拟器CPU虚拟化怎么设置吧! 网易M ...

最新文章

  1. oracle asm clsecho,ASM磁盘组一点管理
  2. Android学习笔记-Service
  3. Mangos源码分析(3):服务器结构探讨之简单的世界服实现
  4. Function Programming - 柯里化(curry)
  5. vue全家桶+Koa2开发笔记(3)--mongodb
  6. c语言流程图生成器免费软件,c语言流程图生成器
  7. w ndows10怎么关闭启动项,win10怎么关闭开机启动项
  8. mldn魔乐java教程_MLDN魔乐JAVA Web全新视频教程(20讲)
  9. LaTex 论文排版(1): Win10 下 LaTex所需软件安装 (Tex live 2018 + Tex studio)
  10. Java 随机生成中文姓名,手机号,邮编,住址
  11. Qt 加载翻译文件基本方法
  12. 假设检验1——理论基础
  13. 什么叫计算机硬件特征码,如何检测电脑的硬件特征码信息(主板、CPU、硬盘)...
  14. java中复数的类型_java构造一个复数类
  15. VMware10虚拟机请选择要安装OS X的磁盘解决方法
  16. ORACLE数据库报错ORA-00910: specified length too long for its datatype
  17. 【Unity Shader】屏幕后处理3.0:均值模糊和高斯模糊
  18. GPS定位详解——涉及GPS版本变化、定位获取失败等常见问题。
  19. 如何用python查看pyc文件_如何理解.pyc文件内容
  20. 每日一遍,包教包会,幼儿园千万别错过

热门文章

  1. 疯狂涨知识!Java多态实现原理技术总监都拍手叫好
  2. Mysql 查询blob数据很慢_blob存入数据库很慢
  3. Swimming Balls
  4. Codeforces 773D Perishable Roads 最短路 (看题解)
  5. NGINX原理 之 SLAB分配机制(转)
  6. 封装jQuery下载文件组件
  7. 去除list集合中重复项的几种方法
  8. 安卓中经常使用控件遇到问题解决方法(持续更新和发现篇幅)(在textview上加一条线、待续)...
  9. Android API中被忽略的几个函数接口
  10. Eclipse出现the type java.lang.CharSequence can't be resolved.