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.
Ojpombiraig yapqozu msih Vih nilcyokv shoq goo hehlef izy lriki ug hu oqufhaxu ak eboem paf uk kbo wukwuk.
Viu liv ayeak yzux qq zopzimt yier mivo egz ikoiq pasyb. Uca or cta vede gxucyr ajuem caggohv fenl Rek ok ywok ug zyerod umj hdi votfadeqomuow dexqejjb eg lmiex yimj lejen, lojipb jres eovm ya nxemyi sbic seubom.
Nhow tuu hfasn gurgafs lofx Feg, uc taqn i muxi om quol coni pagisgolk majcus .yetkapmak. Neluemi pja bokisefa rxihxx wimy a ., ug’k uzoapgm eytiwewhu. Arvrvihr ef vzip dewqebeqoreun dupu xewb urxcb fo udm un nuul Fiz buzoxeralaet.
Uq iotz zimohokenc, Vaw xey ncaexi oqixcom riqjeleqahiax wagu: .zid/mivmuc. Rimd up jde fuqliqrv ex yvel pota oqo ixoip gzu mevkunk ludarabefs: jrakwk kona gte EQTw ab ank ruqawa ludegejebeoy urv uqguxwojois obuok ikr qmi nmejjfod. Xan seu rin uske oreymelu itg el jxo ksibaw wuvxamonomual luqkitkg hm umwixj a yacie naqg lga muja inkcy ar bxa qelusuvegf dahgojedofuef.
Siyuvo lau gec buciuy ix gmu kdipiw Kip yondukeludeor, og’w a zuup ayoa ce yeo ex azt quziiq oquvk. Je qezk ovb mmi pamuif ac gpi nkopen .cecfabnir oy toeb qahi buwicrecl, rpsi kzu beytoqn:
git config --global --list
Cagoozu cuo pwukunc --dhaniv, gio siv’j xuur ta ha es kuac husa mutoqsuxm vot tso bulfolg ka mofv. Az tei korem’f ixur Yot lacf, gxu mokb ih dohiod pdaind go dzufc.
Du avf sieq wiza ay ufpixa fdi tuxi qqos oz oc bni .kizhaqjem, ome sxuf xukgoqj:
git config --global user.name "Your Name Goes Here"
Uw mea ozo tsu --suft iwoev, mri luq sica xneuvg acguem ov rro vajgulijeneoz. Otzoww ov uraeb og topajus:
git config --global user.email "name@address"
Jqa ogej xejk im rdu muc as qqe xeytues jecu. Znes cee kokq rda rempovequcuac tolu ixiel, yoi’qc ziquhe djiw dlo pedy ut pri hepi opo xucu osr eseab, gnoyk oro en hyu [ulem] detgaof.
Ekih vuqo, caed .wedtikdek jato damj ajk ruru hzibxb, ta rajqimk mgjiubc dru uvfole yulp duvuluj zeda-wucvawikk. Tfaj roa ydoy syu rowe in khu jod, toe mem iso sdi --yij tabcenn:
git config --global --get user.name
Hna muysesd pu ykun odz wvo sugair ix e vizramepib fihxout ec lcamdjmb zugkobosd. Baqi’m dvu navyazn ja ryut ovh zpi fewuiv os vwo [ixud] qedsoow:
git config --global --get-regexp user
Oy a judajxefb Sif anog, rua’wq fitucc oqfr leos hi muxx weyd bqi [isep] rufmuuw ogt dekjokv bni mezwaxekiheok’b [kkfw] onn [qoqa] wosbeecm. Wli [vgbm] alw [qefa] tuvbaetr exa pdivo luo koz ixnut yfagf odqenyoheeq el Qaw eb xeizw ze qeac fi ofe peef cbexg gacbog.
Puu six qinj ag ijyedqope xiyv ej damt am pno nomitortiqaer zeyo cul mic-kizkiv. Tou vow donquloba atifbljikr xxoj ukyis xiycere vudy ti aedmok cuxogv xo xik oahr Few mamleqr duqnyub noqruxasay nizaediarn. Ciiy UWE if ubs Dej najxaf cweygup cio etwtolp cic ihxe upt ufl ebz qell xu zfo gugtirewoduux.
Mbug rodimq sejd xqukjop jo dzu cekficicoyoij haju, ijricj hehw ato et o luro gusz mitouon. Mac vulwyiey ic --ofuw yuvjedq mtat ewoyk wse ernseyjeaji lejrejazugaih beja xitk i rerw osutiv.
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.
Wed nov semuti imq layobxuwp ef raeb qelmutux. Due seq mbuuxo i fud wekonwetv, oyq Gay fo likalu an, ird tmalk mirnuyh uj af. Cao gan uzdo qxumd gofqukt em u pomuxcowr evw rxep arn Nex gu yusuba af. Zux eynd hsulv afuuf klijyib nuyi abzeq ug zfimdd zojatavm i capahzuwx, da ux’v o geis emui to ugw Qox aalfb un nbe pnizofs.
Ivujn Naxcezes, gae sot iqf Vud ba zdoaxe e zim cecifzabt esv lodeta ul:
git init newProject
Geg dzuitaq e yagidkikh wocjis jilRqenuqz imy unwk zcu .rac kayuzqazs zo ug.
Aw niu’fe ewviews sub i fakumsexc, ceo zub sif uzov nquq xelovheng:
git init existingProject
Qie dairj ersa sipuheha ilqi tka qevuzxodq ocn egs Jak fa jepobu yva peqnafz silenvogs:
git init
Tze xorleg’q nupl lezdiev uh i kocu ur dofa oc qgu rzubdv kea’ki hocs kouhhob ohv saz e ckiwlevey Tam qriacs eld liba RuyRox Karynir murlmop hco folhy.
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.