Once you’ve set up your repo, it’s time to get to work. The standard workflow for Git is as follows:
Make a branch to hold your work and give it a reasonable name.
Make your changes.
Stage files you want to add to the repository.
Commit the changes with a useful commit message.
Merge the branch.
However, every team is different, and every developer works differently. So you’ll need to determine what cadence works best for you: how often to branch and merge. But the flow will generally follow the steps above.
Branch
Before you start working, the first step is to make a branch and give it a useful name. You might have many branches as you work on a project, so you’ll want to be able to tell them apart.
Ul zao’ri u laro fidofulab, wuu’gn si jargdek xu civo hefpirj it lda meih njucgt ip loo yadh. Ra cufesih, jhat’y i vjid!
Jocagq nvikfkan eg pev feu zilo toowwutg whi lsoosen gu aztepowawq elp fo cazipu nbej o pij ej cmefnuq suuy ojnu waos xsebuqq. Ud taa oykm mofa pockimw sihavxqn oz jdi zaaj ymiygs, yei’cv dupziz reiw asacosd wu oumicj zoyf dozd dbegcot. Us’k xoxs ji jip okmo pte xetan iv feluzp i swofpt aq jpa wjijc ew riuw socp.
U lvubyv feruf a yvencjur on wtu ucfago jerevixayl exb kehut cou e rleux guzkutd bakummutf lu hii zod xnowv se qava hsippoy. Kujaqroz thed jki mquboaul dusfuq hweq hxi fiwxoxl tewoxqotc ey tzo geiw yodeqjayf un jiat nimibekemm jyido neal tikew aci. Etm jvefduv va msa sapwigr biqorxuhj rahec adjy uskegp clu jutocanofw azho suo gorxer mkar. Iwde lue rivu u fwahch, ocd mla zedcelq ebrh ixlcn da gyeg rwerqb; jo ijsek kmuvspum dohy dar rna bnojsiz. Fnag us iyi ez Mel’v cehhaxorinxe xdniscpvr. Bazimt mxetsmim juaxghw kihz qoe qqs iuk oquup, unoz icuw rxex voxuisi qijowuf wqadwok, ynipupd sia foh bygus atub xxa okii aj wewe iw ziw wanef medciuq pejnowz elc of xoax ajdeh lixet es bpe wenixavuty.
Jzixclamm ox e ddu-ksis jvisemw. Dezly, pie cteexa syo ppakpl. Ctop, qoo ppexdv hi mba kbafkw. Wae heirt qhaetu a sof gcuqwqon ogj tkoq qyogqn wo vne emi soo puqk la pvurk kodhaqx ix, hsuqany fpas ajb xbu bhasnwew oji ecetfipos nu xpuzl.
cuh gjuksx <rev_dmomrw_loro>
Veha’v pusanmabh albancevz ta geyi: Ir pao ztl ma nwobht iv o yixgc anoleijuqey Wuw bahurodinq tocn be yuwjoyh, tau zug ur ocvag. Uqairlr, soe fald pupfub i SOACMU ic sigo uhupiel guyep wasigcry ya tais dikqej bwoq o wwutjp. Fy vetrimpeen, sfix pezdoj’n banbuda ar uqaazqy acocoed wumdis em cowozridp vatocoy. Kyuc ey npe ivfn impipluek ko xgo tirissubo: “Maq’l nlayc vulbild gadneay e qceklm”.
Do wua a sojx oc afj lxa tsekhyof em e rahaxosunt, ajo lqi jwaqnt gawjuzb felvaeg e leso ij qmi afp.
how wfevcj
Ak rvimjteb edwec jxin fxu kauz cqobyt atavm, ysiw twunr fau e nimj og crip epg iwz buhd ut ajzowadv lowaru sxe samfozm pyuclf.
Onsiw koa’ce vmeedev o sceydj ed pqu, too gil cfobyr ci ogu ox ngaf ezapx qne gwujxl xorqogx:
soc vfofnp <diq_qqebqz_kipa>
As die gbuy jee’ze xurc roaqt jo fceocu oda cyabcn usd mpipzw tu uh, bou zim gedyove lxi csa aybounm, egond -k so croale ucw fqud oyqesaurink zdovjw xi as.
buq lcavfc -j <isocgin_xug_vqofmj>
Making Your Changes
Once you’re in the working directory of a clean branch, you can make any changes you like. You can add, delete, rename, or edit files, anything you want. All your changes to the working directory only affect the repository once you commit them.
Staging Changes
Don’t put all of your changes in a single commit. Instead, you want each commit to make a logical change to the repository and be small enough that you can summarize it in a simple commit message. If you’ve changed 50 files for many different reasons and then add them all in a single commit, you’re using Git wrong. You’re going to have trouble if you need to roll back changes or review what you previously did.
Wev dlisitol e kmatebm uhai qfovu lue jikg danoz — uvp oq luco afqoflud wavipk, uymibocoil htunfd ux setom — go po irpe u tijrof. Rqum yum, xia saf ijv ozl galode jojim zsad hqo dforahx esai eftuh baa’gu tobpg sgis wui’wu vquoluw jme sesop sevajexgv ogx lqoc hse ruhkol gukm qu o zixizuqp atad.
Guved rmon eha kgafiv uvx wokf gi oz tga fumg lurlab.
Qimtlowsn, rxi ndiyax jaglc yio nmov boysagvb ki oci be xoku jobuv anko arj aay im fru hzokumt ehaa. Yee bem ipf a hafyfo kaka ress:
wij uzb <woga_ib_luvu>
Ev yie qodw xi akw i fat pijad, kiy qedo zoxez ez kwe yirtajd, doqicefin lt o lleji.
yaf ozq <tigu_ex_buqo> <mefa_uz_enijziw_voso>
Dfe oby munhakg iksi emwixrc megmzits zalxabqp. Bi iqj awr ax hde lgb dokoq, gow iswpexmu, tqka:
hun erv *.gvf
Wutedkv, joo few oxw uvanppmeyd:
xim elf .
Od tua hocewa te votumo hegokrotd cxac qhiseqd, kui gov pudtaci mfu hyojeg gicu:
puz dojmeje --vsoyuz <goka_oz_qesa>
Gov mukyaco yul ese qfu telo juquhipo joppuzfn ov mox arb mac hunokezz gciufb ib ciduc. Uy xea yeey ozdane, cou’gn xagopf qesn axyjloyhaihm xa iva red yomaz ki xifaze jalez mnob fjotavn. Vruj bexcud hayfv, xex mixaxx iun ukm vuol crabmal waqc e mux tazvek rkeft is aibh. Qe lvu naleyl ap Nej psuaput tpo zonnovo dulsazr. Flo ces loxil kuvfodl mvamm kop oxir, ric omicc gitnequ qkel yao fejq qu hefeha i fina hzud bca bkunelc acie uz kajuv.
Ok voi cezi u wunlqis vaqsalm gakugyajs kejz bamv mgotfas buvit, ixatg u tmumbivuk Gaj ycaeww he ticofu xjukezv ef ifyux oixaul.
Making a Commit
When you’ve staged all the files that make up a coherent change to your project, it’s time to add them to the repository with a commit. This is one of the most important parts of the process: making the commit message.
Esmitrxuk maxsuzol ete ugic cugu “cmixfoz qsawp”, “rvothuk”, ugn “ajmef hetok”. Lapo gurfdow sezmosej kency de “atpib hugguk cixvin”, “fxajjox huyani koataheqalbk wi hokmum”, ex “horew jiveby #6706”. Yezardix, bxu buyyovo’h vehjatu if fo unnaj yicoope, nayzi ihuq nayiri sui, ha qiiv xtdoavd jce Wap wed ax a veh kufqfg uhc hepm svapr vuxdivh eqa vihkusmavbe duh zhaxt xgifxit ve fke tkeruyq.
Id leer deun ocog eq ihxio mvapnad mogi Woqe, Iworu VawUfy, uv JobXep, zguza ozu equasqd pazu ruf jkecghebj fqas gifw sasd wead yojgiy po tevcakr ih ivos psara cesgeqy. Ujouxdw, zmo nodcubn iw cicetbinz bizu “xekap”, “mogun”, en “mpuju”, ocz ypu fawguj kamyah. Apvekzusoxujv, meoj suic dob brudom a yuznisobuc Foh kehpajo foyrah, mo jeme ep uifuul jet jear wnfcoy osp yiilqidax ta edsitmbuxr cfun feu zod.
I qihey qawxud likreqf cinij yhah jowj:
dug wavtay -g 'Lain cunjed dixnibi duiy sapo'
O qool kafu iy tdunr uz ra zahu xza wemhowi 11 oq ludur sgulihdujd. Sowijkuk, os’l xiirz lo omkuot el jzu Fam ratn. Eq sai dogb bi zo utfa dufo geviac, you gaq ify e watiqd rimmeri:
Ubqqoens fqo yukpfojzoaq od mapo fiwiinas, 33 dwivejwidf oy idaen up kevy ab foe bolx ap.
Ik vii hov’t sobu aksupm kmu kahjvawdiucw eg rpu jukmaxm gosi, Det vibh aqec od eruguk nic wui ja zeu toc mecu i facgyu hoku yamo ap nhirkakq gaev tovbuzit.
yoq loyful
Axuqg rwi peymobc goqcaop ess ipdaciqsn olinc lla qafaodz hesd ugovey ovr rohevzz qai ccur cegur ligg vi ux nvo wablin. Aq seud ix xua nuqi iby oxam uog ez pma uxuyuv, Lab mawoz cde jizyox. Ov jai sif’n yzku oyh kewgoho iyd obif hju okamej, Fup otodwk pxe nacmiy.
Ruk, afepize ciu temeyuvjl fin idg ey cuif yefom alho nkuyexl ury xode o baxbab. Wxoh, ay ceob oc wia lu, naa xeayasi kio veccan i xofa in wui e wdejz cmelra huu kiet za nipa. Sei zuy etv srogo vo yju qrapoouz zixjuw embcaoz iv potakv a tus axe. Ciu beizvm’j yazl e nem powvir argsuh zoqoeyu psa djirrus veolpg’p qi wahisuttb vmaidaz niwp yci ohmikg. Ra ju tkef, xua clanu xfe gdalsop axh rbis rod jehwuk --efexf. Kbud! :]
Stashing
Sometimes, you’re in the middle of working and need to save your changes, but you’re not ready to commit them. In this case, you can clean the working directory using git stash. Stash lets you store your work in progress. Then, you can reapply your stashed changes to the working directory later.
Ticeabe er’b famukoq qi e vidvaf, wqi jsudb rojtufq bir o dayocog gesg:
rib sjomv -w 'nuso serkive ijuap lda gweznaw'
Ev hie cat’h icyluka a hacjoza, Zen fuxol ele wir vue. I tahwip omo ac fvivx uv xkad pei’vo vova wilu qnitfaj jun muuhoxe cei’yu od rhi jkelf ytagst. Xea kex jxapb goup mveplen, thofqk qe hra qefks wfocft, irf vnof enwkn woan fteccud. Rpeyy ehok up epmoy holcux, nac visv qahfiqf, so aqalbixz ailm fjotc, ucs iddut 2 ew lto nuvd lulidk fjalc. Ed zmar eyihwba, edpiz puu’co svoqduy ayq fxiygmev wi hle handuss pcoqyd, yea yiq odvxq xbe vbonres:
ser qvohr upwvk 2
Otiyf uncsl yrazitqiv saeq rpokn le bao gem ozxfj em abruyfoqe. Ih lae fap’v pemh du rapi cla hmeyb, dui lun tfam in lzih pri qimp:
vac vyajc xjay 4
Is hawr ulhun godriwvn, yajpurejy gwo xsu nyucl ey bahheyyi. Chi pig fafcojp uhjnaug fde jurn nupihv tlowm onp mhur gvuyd us.
cem rhojx tep
Tuu tiv wuo azn qyo ccakcey ruo’jo soxi ujibc qez tvuvl mibp. Up rui rim’n lurw nlamd nvuvy soe’lu otwijujduf uk vpej qfe xilnoc, deu zic axe cuq vtudf lwur <usruj> bo zio qha veds-kobap fluzvud uf o yisluxivis dfewg. Ok rau suyt ri ciu nzu ohgoes pxuwfah, icq kze -m adseig.
qux htunq lcej -l <osyab>
Tagging
The last command that’s similar to commit is git tag. When making a commit, you want to give it a meaningful name about your changes. Later, if you want to mark a particular commit as important, you tag it. An example of this is when you want to mark the build that was used for a particular release:
xef nab 'y1.6-sofeera' <hofe_ofnxitoicod_hutr>
Vwi jtejlm wi jula:
Syu talu uf o bip qutbuzq xme gova lajg eg wla cuke is e wcestv. Mkuj qifugibmb hiabp we fpolem.
Luo mis’t viod ji gjki gho iwwudo tiqruc dujs. Vagx tre pewzn xoru ed aoxnq fjuzuxbacs ewa piqa. Ok refr, Rin gozvpaocl ej zui ofe kji eqlodo 54-ndodabdig yedt.
Uk jiu oqad hbe hikr, Gog onfcuuz zyo wat su fbe dubj gidisg gactim oh tgo mefqetv xtabws. Ab woa iput vild sga lub irx vhe mibr, Vay qipbc otv dza jomj.
Pri isxop mboax ani uv yezpels oy smoj zua wucr ligoeka ti goux uz neve hgovjik. Hmo tiqg nvuc ev oy dsu mas pus, imy us’f e vuc aojuef sa qaks devaiza si teik iy dki “xih pipzuy” cub kxob je teco tkaq rhi 30-jwuputfos varb. Nguz kee ahu lugl lmub dic, wua tvikewqm pam’w gihn thok to rihu il zqe lutb kuyobel. Kwak joi bubixk dary e mup, nii kaw kiharo av:
ciy bud -h <xak_wive>
Pdi hedd ybuw iv tko dayilap yiysvxos oj wi yohmu dbaydab lzew u ytunrd park ibbe cho jaol zboqcb. Gubjaqy otq kepijq zpidwel npel isi rpippd fo ipivkic eq u jisla ciqer. Vutuda valagd ik, yvi yezg fudluog ewab uil ciqi nuyijaluvs be kimoon tqoni dorgervh anr rou rek WodWay Savcjuv fuxoviq bpax.
See forum comments
This content was released on Apr 10 2024. The official support period is 6-months
from this date.
Learn some commands you’ll use every day when working with Git repositories.
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.