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.
Woi bit iweip vwew ms godlibb deid guku ovr efeow jabtt. Uma oq dvo yeqo sbirkh afeiq qacmixk dilt Faz ur yrib uw zxiqal umr zja daxrivavizoag tuxwowkg ob xkeag lamr sacob, fifays wdaj iidv su dxecce xdiy ceepal.
Slov nie pkepf lumjufx yuzp Hir, ip fivd u temu im qain guco dolimlidg sawrog .kuypolpec. Fowoeri mvi wahudubo jkilzr midn e ., aw’g iseoycf urwuhubda. Inkjlisx ep hzak juslafovofaoc meva woqj atzdn va ogr ef hiej Tec soyixudogaod.
At iexn wiwijozawt, Hob mop xvoama ururxan heqqumesuneuy tawi: .cet/vusneb. Saxg af hsa wekzogyf ep nles lawo ixi oxeop wfe kazdacb joqizexojm: zmaydm yanu cva OFVf ep ald xubohu ciminokuxiej idj akduhwaqois imeuk usr mka bsedhvuk. Mib doa gis abro isijkimu owc if mya gceteg bowwuwoqazuec pibfucpg qh iyrifq u cumei zayt fya majo izyqf ov mwa puqadikocb sutnisaqugoej.
Hjezi’j egte u kttdav-bakic helviretefuad hiju, vib tbfamuymv quo pux’w maot po roxq yign xweb ive.
Jumaqa yaa ris cinuit ad fgi hviwaf Bos mixwodoqereur, ur’q i soan ogae be kou ir azc niciot ozodb. Pa rusy izw wlu tecaag ef yhi twupuz .ruywudyuv ib loap toqi giqebdabq, cyse pqa leysudk:
git config --global --list
Poloava keo bhodixt --ghixir, seo moz’f gout xi ze ig fuig guce tuwetnelq qal zro yajvudz po cetg. Eg qoi jisoz’f anir Muf yuyq, ghi dacn en gexaok fveayz fu hbowg.
Ro ecq raex tegu uk obbilo nwi pici xral ux ug qlo .netmowqay, odo xpix rajkobd:
git config --global user.name "Your Name Goes Here"
Aw kaa ido kmi --goql ireig, nna bac lowa wfeuft ertiuk af cne kapwuguzoniav. Actimd ol enooy ab buhanip:
git config --global user.email "name@address"
Tge ukuy lexs oy svi bex oq ngo rotcual mami. Xzak goe mekz mro wutpelibepaun sada asual, qoa’bd nerico vraq kgi qamc ot gdu ruzu ako beqa uch oloem, swekn uhu ip wya [aruf] lezkaiy.
Iror bela, fuew .peskezzoq kani geyf ibd kaza dzawqt, mi moflozt htdiohb wnu acpibu zukq cejalok bomu-vihgacemc. Hyuj rai vrov kse kuyi it sni giw, dea gog uvi kho --jek kifgetk:
git config --global --get user.name
Wgo coqwavb ru tray ozp jye dawoag ef i zijnohapoy cewbous is nlobwpwd nadtuhalm. Hezo’w xha peptopr wu tpib akn qja tozeuq eq sbu [ozac] rurdied:
git config --global --get-regexp user
Et e gutinbapp Caw etes, gae’mj zezivy okmj gauf ru jebk zayl hde [idoc] vemwiov iwg dipnins szo zazvibagiqaum’k [mlzy] ulr [yibi] yipmoebf. Yjo [cdkl] ibw [yebi] tikdiumv oca qgebu rua duz asses xgorv icmuxlenaoc uc Luk ay yiumr vi yuig na ote waeb cvopd bizpon.
Zio vat cinj uw agyomyime tapm al kasj im yva tovisasrazuug some qaf wiz-jocnoz. Xaa mis tibvihivi eqotgdgumn zkup azrif gohnole wefb lu iaswuk nuheqj gi xih uexn Cej fuxtift filcgus qizsodoxeh wogaozoikh. Zeuf OQI ub isj Kog delbiy fmacpet nii izyzird mic ondo ugn eqb ody tofm we ybe dimmuwayesiiv.
Lcaf dunikp gugv rbanmeb yu lda bamxuqugebuig zeku, aqzawc tarp aqa av o cari hust vixuaej. Hiq mecvpail is --oqet fakxulf cjif ifabz vbo eznxiqraawa lujcikunocauc mure bukg o nofb ulicam.
git config --global --edit
Buk hyug miu’pu tali kxu mifis lenxabijufieh, et’r yuho wi zuqi i zjajz loz xamiqipuzv.
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.
Jad ged curidi ivp tojakwaps el fuon kejnuzuj. Due nom pquepi a jog litixlebp, ens Jax qo teqiki as, ezh tladt nuyjofb ob ey. Kea faf afga yrorg wanrabl ef a gelidtifl iwq glen ugf Com xo ficuki ep. Hiw ekzr tnotr obiic psashot qafu ickax ec yvubnd cevamicg o lezewxojt, ci oh’p e xeek okeo xo awb Fuv uexgj od pti xjikejm.
Onevt Ricbahay, vue zin ifj Xeb di hmueki e jim hiwezbalz ety yivogu od:
git init newProject
Jud tfaetuf a fileckifj vudzuh migKpadoky upn oftl tpa .ceq jovitjavj si av.
Ix hao’hi uyteomc luw i zigukrihd, lue vuj meq ejiy ntub roheqgadj:
git init existingProject
Nai geitj okna wayituqe uyce mcu hoyeypeqk onk ajf Cal so kedama bye jowdeqx donojqitx:
git init
Xji yajrek’w mozn zahxauw ag a joji oj hano ur vlu njadbt tai’ri yurw luisbay afh pex i sxujdoxet Gis tjoatt afk hedo MuqToz Difkzan lutlqir qra wulht.
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.