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.pswp.cn/news/393463.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/393463.shtml
英文地址,請注明出處:http://en.pswp.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虛擬機,就是打開個一個進程,一個進程有多個線程,當多個線程同時進行,就…