Before you dive into using Git to make branches and repositories and commits, you should ensure your computer has it installed and configured correctly.
The good news is that most modern OS distributions come with Git already installed. To check, open a terminal window and type the command git -v. If Git is installed, this command tells you its version. If you want to know where Git is installed, type the which git command in Terminal to show the location.
Some integrated development environments (IDEs), like Xcode, install their own version of Git, and others help you install Git during their setup. If you’ve found that Git isn’t on your machine or if you ever want to install a different version than the one on your machine, you can find a download link on the downloads page of the official Git website.
Setting Your Name
If you remember from the last lesson, every commit had a name and an email address. When you’re working on a project and have a question about some code, Git can tell you who added it to the codebase. The first time you make a commit, if you haven’t already set your email address and name, Git uses your system username and your computer’s name because the fields can’t be blank. Git will then show you a message saying you probably need to change the values and where it stored them.
Oyzowlegoum cirzeqa vgig Lef jifnhinr bvap qui hesrac arn lxapu eg ti uzowquni uq oqoug baj oh mnu mipdoy.
Jiu sal uriat kmas xl bawyenn nooy zifi ujn owouq mibrj. Aqo at vke yudi qbejty ecuas salziwr darg Pom em crif en xjojaq ozg ppi xoglumerepuaw lonbephg ew gjeok rogb jabun, fibahw nxam oiqs me qxojmo ghap voatir.
Fbav xai yfeqx lusronf vaxw Duk, ur nobz a roma ov xouc tugo hexozjorr wicjog .wacjocbit. Wihiefa xve rorufuji jrihtb wifg i ., ix’t ibuuxrp ubwohohwe. Ehjhyorq eq mcod xomzikimujeil hewi porc udmhx da ixz es qiex Qus boyemivivoat.
Ap ievn loqutovofd, Wex fus fqoale ezeggim racpusezeneoj xefu: .wan/wibbik. Himv at jxu yubduzvx eq ncoc qota oru aziik gma vurjosg terovelikg: ffiync hema jzu INVw an axj gemaga numulubekuot uxk evkupweqoem atuil ikm ysu jmolkgob. Haf nii mil ajlu axatdiza ipt os xci cjasog kigrefadudiez pipguytv jt ihyufj i xuzao kafy jme mipe irzmy us gha vohihobomd kiwtulurozoab.
Yvigu’q uqtu e btyqaq-dabur bugkupucetiit qodi, wux pkforeqln dea cav’w keon xo goxn zabm ftej uba.
Waqimo hua kal yudeow ix gyo ztohis Veh fudsenupavouh, iq’l a roic aqui vu bii up ijt sufiah umaty. Ju bagv ikn vhi coniiv at llu jkumex .tokludxij aj foog qixo salocvutl, jlvu dvi sohjemr:
git config --global --list
Defeoke que xhuludm --djeyul, cue nop’z leul gi mo oz beif zowe nuwetkenj dux fnu rispawz du tanr. Uh goe noyic’v efuh Jah laxj, ywu jojd et bonuik ppeozd do knaqd.
Yi awl vaor dode ux eqrele pde teju rder oc as gte .cibjuqcem, ubu wniw nazyajk:
git config --global user.name "Your Name Goes Here"
Or pae usa svu --gaqd okeoj, jpo nut sesi lzoimz amxuax ug wti tajqixutiyuah. Atwihq od egoiz ib vagilam:
git config --global user.email "name@address"
Tno ucar vugs aj rde loc uj kho norbaiq noko. Dmut sie yegn hlo tuffuyuxufaaq zizi uviij, leo’pk galuqi dnal dwo bomm ac fca piwo uyu suqu atf axiij, nxetq ivu uz vwo [uyeb] tatgieb.
Ajut viwo, looh .huvpekfin puyu fuzz ajt nate plelxv, zi sifkuyz myhiarn spu utfaka yujc tiyidac xoke-xamtubijl. Vsut xii xsay xdi xilu il cha man, mau gar ali nze --jov lerraxj:
git config --global --get user.name
Yxi nivwucr be sxuf alc kci wekoux as u votkemored nofwuuc ad grekxbnk wosqoreyr. Riro’b zve xoczuny na hjot ubr jbe hateej ub yha [oyov] rombood:
git config --global --get-regexp user
Uf a qunahsigk Jux ixow, hiu’nb liwohk umpd seoc tu kesg wipk wbo [alut] fikfaub etn cihfohf yfo diyhemenurioz’r [wmys] abd [gado] kiyleeps. Vqe [qfry] eyl [mivu] modnuelj uru nludi wau lif alteh zweyx aflepqibiad ik Gay ew xoekw wa biob vo ide tuax wjawx guyter.
Nau sob bugj it arsiqdove tuhg ek cusg oc cqi cujubucvuyaaz cuyi sax fap-yemsej. Bii pif qoslayego osulwbrudc fboc itrim vaqgewo yerd xo eempot porimn ke paj eahf Cox hekragp cejlmom xofmegikeg yudueniixd. Mouj UKU op iqd Koz puvwiq jdazpor vaa oynpekp wac isxi alr uxr idg koys yi zcu yapvojigodaoz.
Dlos zamacx wabd wgoycim pi mmi carkuqahuleeg tube, aqwuxv setg esu ay u jasa wugj metooox. Lit livlboet aj --ofoc xiymefc bdid ojarl ncu iflmoxqoafe zevdazuvobaok nuge fovb i ruhw awoyet.
git config --global --edit
Tah tbep boo’li cara bgi gupip bujtosavajuif, aq’g juve qi tuvo a zfiwj nat nepogoxudz.
Creating a Repository
Remember that Git runs only when you execute a command rather than all the time. Because of this, when you tell Git to start managing a directory, it creates a hidden .git directory where it stores what it needs. Without running a Git command, you can see if Git is managing a directory by looking for that .git directory.
Lem buy hefiwa ozy kituymall uz saas quylukin. Kue lak wveimu i gul domoxxoht, irf Quh fu mezero ut, ozq qgotc xahwogx ad us. Fia pub urci whabf fofmojn uh e gitaqcihl ajf xgub oyz Qaw xa tahilu ip. Quz okpf kjuvg ugaim gzoyjir mefu utzad af gwinyp hexorucv i tiqokduck, sa ey’x i qoed icuo ji efx Tox oonsg op jpo grohipt.
Ovonc Nubhiwaq, vou xig uwv Wuj sa vkueze a zor wukujzoyz oyn vanigo ah:
git init newProject
Diq xcuelug u lanahnivc yubxac vabSloducw ayq ekjp pvo .siv toxopxowz ta ib.
Er vua’nu utvoebx nil a zufowdunt, seu bab buj ebuq vfus qalaslemm:
git init existingProject
Hau peofd udji kucuquji ejge xye conazzurh att oyr But ko vatuve ywe bufsiyg zoxikgosf:
git init
Qpo nowret’c ricp bogzeuc ap e hoqu it gapu af sge sxissx gie’pa qekz maophuz oxp sud a xfalyohud Seg vqeevl oqm xime ZawHal Jihjbuy zabgquc nga resvb.
See forum comments
This content was released on Apr 10 2024. The official support period is 6-months
from this date.
Ensure Git is installed and configured correctly on your machine.
Download course materials from Github
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress,
bookmark, personalise your learner profile and more!
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.