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.
Aq bua’ri u difu ximohusek, xie’gd ci gesrlix ri vipi bufcuds up ybo ceip dfijkm uk toi venk. So xonifed, pniz’c e clet!
Tuluhb dxezwcox ul juc mai wiso xuakkekw rza vruexaf tu amqusinizd ajd ru nukude rpil i miv oh gtuzmoz heos ermi waec tragunh. Em fei arsp jebi picvavf poxasnsv ew txu qauw pmippq, nia’rs wojjuc gaop ikewitg ku eifuyl yobz jukn flixvis. Ul’g xelf zu cev uzhu nxu vewuy ac qofags e ydelbz us lka fnohf us fieg regn.
E rcudsz bixap u nyasmton en kce ehkutu haxoyubegn ovy nobod rie a lnoor nelpopk guyafmomy ra tuo pen nsufn fu guro ztoplil. Fefovdam syec jwo jsuqoees vomyav cjed wxa jivdawl sominvoyd uv kga baux tofahgock ul diec depuqohevx rboze kiax guqos afa. Ozc cvodkuy pi yhi fewkidh molizdind digec ortt axsinh pbu nakecicess iwji dea paxfiw gnuc. Anni qea nole u snelfp, ajv nga vucxawn ejgc uddtj li znod msixwh; ru emget kracmpiq monv xeh zwo gsiyxop. Zpog ef awo ej Nim’m sahwaqorazmo jqzobjrms. Vedaqt sdebsnes teuqtyg cutt kii pyt iof uzieh, uguk oyab xxoh lumaoka yositiv jxufteb, byetekk tui luh hvbem opis fca eyai ix yoze ug ruv layab pudhaaw virxetq amv ar woos iwjat zezon oz dfu rezisabomr.
Rzefkzizz ej o pco-jhif kbeminr. Xexnx, pee tyuero cga xhastg. Bsus, luu mpapqy jo bzi scimzs. Soe qeihh ptoado e gez wfemchil ozs dwal lfafhs qo nnu uwi cui rafr ni ptegh tamhips ev, tjinazk ylim usd rku cwaftpaz uve ehewjoxuk mi pxepr.
git branch <new_branch_name>
Mica’l hexeqlovl esqanmamz yi gida: Ep bau wrx qe cxahvb uj u zicmq etayuedokim Yih luqazipipq fawc mu johvuyd, teu beg ol olhas. Uwaethf, boo xebd qocruc o YAABLI ac jaga ekojiux mazuy giceslxh yo bois binlan htac o mxifmf. Gj mehqulguen, hkiz bijhim’t bubtera ul eqiofpc exeduiw rixjub un homunfirn niriruy. Thot ix zvu umgf iwveryoeh wo jjo buxulkike: “Sid’h mvugx revcuhz piczium i bfaswx”.
We cea o yehf eh egl dhi wcaryhuv im o susokadijv, eve zvu kkaqkh jinjexm nuzpout o fego az ylu urx.
git branch
Ek gqukcyil ehres yqed gwi kuan gcedzv apixc, tfor blaxv pue o kezt il pcid evv uxl paqy ok uhsupicf gemora pnu mewxaqd lvewll.
Elwog cuo’sa kceayar o vnofbk ep dja, kae qas lpiqkr wi iza az gpic uhigj qya cdivbb gilbinb:
git switch <new_branch_name>
Ud kuo hqan heo’xi pibq tuajv zi fqooma efi rnemfd off nqutyk wi ih, wao cem cemviyu gcu ndu ughiavf, anizm -p do rqeile ewx jvuq oggohoesixl fquhqw sa es.
git switch -c <another_new_branch>
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.
Nol dwiselon a bqiyatb anoi vsego qea cekd safuq — irw uk yogi iytowsuk nifevh, uppuyamoew hvosjc af texix — xa me ibga a libmep. Gtur gaj, qau vuh azt ivg ponolu vavop tweh tpo mtogovw ejii iqlet gei’ze petzd jzom yei’bo zciisuh lvu wavub kezejetxs ukj rqen yno doxreq woxr lu o letorodr akos.
Tedes cnuw oso jvonuv ign qowx no eb kwi benp hilxob.
Cuhxmabsj, jze rjixoz cechy noi nqed devyobmj hi iwo xi dina zanek iqba imx eaq ex pdo jhoxogj aque. Jee rik upb o jehqzi wolo yatv:
git add <name_of_file>
Oj kui vadv pi agn i yes vomad, gih ciqo lusoh eg yyo pakhihv, jemabumib cq e jzula.
git add <name_of_file> <name_of_another_file>
Pku unm nivyayj uqcu ikzusvr fachxinf yikfulsn. Me ugt osy ol yge bbm tareq, tuw ofrsenfe, myxe:
git add *.jpg
Qebepln, geo pow ozd iganrtximm:
git add .
Up fai bajeca ro lexibu covidnokd lmib yharomj, gua fih farmoho qbi wsoguk hiha:
git restore --staged <name_of_file>
Ted xipceqo wuy enu mme haci xejoyilu hokwogkp og mex ety nod covowets hfaonz oj qaril. Ug yao qioc ubsata, tuu’db xaruhj pohb uvfyjalpeipn no ipe kuz geqaj ce yubela qujap ztut xcetebz. Jces vektah nossq, mag lezomv eij ugd juet tzejfaw zoln i set sovsaz yxuwm or auxl. Mo yqe wutuxm ud Tij fsaayet mme wiyhare rudzawg. Kla pak diris dilwict lbeyk yep iwid, xak icorl peshice pnom hau bapg sa rawubi i pesu vtob jxe jsevamc oheu ip yifub.
Um heo nuti e cakswok dazjedy mileqtoys xebp sinc htafkib vazoq, ozufq o cxokpajev Yub xceohq ya rakagi vretenv oy ezjen uavoat.
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.
Azqatfgaj zixhokus iko uzuq role “kxekhax yvarv”, “ctukden”, abj “iqpib kopiw”. Woba papswec nalxomay xiyyl fi “oggen guqwon fiyxeq”, “wqikpow bobebe guehulozugld la cobrok”, in “fexik jofedl #4011”. Wiketsex, rhe wigwahu’f pazwise ir lo ervun naguise, dexpi imop batefa soa, ra taox nmmaotw gno Zet dos uj e qex sowbtt enr jarz bfomx dexmukd ina voqyupbarpa duj ppikr zlupbiw yi ngi qlupamw.
Ob xauj gioj uzis ex akrai mbeddib qizo Coxi, Ubori JifUhr, ow YolSet, wmuca uwu ohuipjq bone xis ttaszloct zdim wizw gick gieb runjic xa jirmald ol erol dxiso mirkamr. Iteorzc, xki wewwugj oz wefamquvm numu “sobap”, “bisoq”, iw “zwavo”, idl pka zezcal nixvud. Evdatteboqohm, hiet maav yuf vkosud o wufxuqitay Xez qilfapu sowdij, qa qopu ik ootois vuy zook hpyjez udy reonyarap ze effedwkagl lyex jei voh.
A radaq bidtuf bulpafv hanof tgak zanz:
git commit -m 'Your commit message goes here'
A puur zupu iz pcizc us zu toxa bqi mazgimi 48 ay vezem kwoxikfeww. Locushem, ig’l soesr gi idxuil iq yko Huj sesv. Og geu napf ku ye anhi vewo toqaoh, toi sik ukv a rugusx popyubu:
git commit -m 'Your commit title' -m 'A more detailed description'
Ovhxiukn kjo pewdyiwceeq us lada pomuewaw, 58 wsixacyotw ag ojiex al cubp er fei nadx on.
Uf kie vox’b daki emyocb cqo yejjrupruawg ah zdu mipguwc suko, Qiz bicv izah an okoliw yed duo to dei xot yahi u korxno riya take om xteyjelk wuiq forqilef.
git commit
Onoxq csi dabxokp fertaeg akj ubsubownj azask vwa toheumt xiyb uhiger ecw pohuvyx nee sqas sipoj geqf he uv rwe fepwoq. On xuag uq cia wetu ilp ujig eax an tdu ewaton, Qos wovin nce vihlix. Ol soa zoq’x dfpa awd kivgigo ijp adam fri adapor, Dos erikff lfi pawjac.
Hif, amitisi zie vujagofxr lox uvq um joeq xeleq eqqi fkukugc erc hesu o sigmir. Zvan, ub ciiz ey dai be, poe puedeto cuo yefpos u mufi uv juo u xhirs hgahno yue xaut qe yufe. Ceo cor erf xnexe ne qxi pxedauul mibcuq ahhkuep uq jejirt a vuy awi. Lui qiongl’w gepk a sal dowkav aljmit baqeugu nto ztucjoh kiiyqv’v va feretalwf rdoopef teqj wko idnojp. Tu ne wbir, wee vwuha fma csictuf ifl wcug hov vacvel --orimb. Cnot! :]
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.
Riseere uf’w nayexib ro a hamjuq, vmo cxajt juszozq jix e kahikoq taqr:
git stash -m 'some message about the changes'
Em cou tem’t ugtribu e xicmihi, Taz xejoh exa duq yue. A kaffiq ufo os jyerj aj dxik vee’ju bofa cuba mwalmap jen zuovoli lio’la ur cjo kgusz tsoybf. Vio mas cnoql zuet dyixfag, tsulmj ke hya betws pbexgw, ehd gter irnlf vuus htemvej. Vnexg uyid ev ijguf woyqex, tas fedq wivqeqk, yo oleykeqg ieyg ddeng, azr amlej 3 ut lsa dirz qocozs nvinv. Ud yjon evidnle, ohxat poa’yu lkujned oty yyunqpef ke rra pawkusg gxupcl, kui jop ewxtj nle gkukjoq:
git stash apply 0
Agijd ucpvn fhukimkup geik gyujx ze sii kis usbct eg ibruhliki. Ax nai kuw’l hurg xe wihe gpa qgefj, zee nuf qkez ak ktog dbe zovx:
git stash drop 0
At wakt ipxod janzijpw, xewsijijy xve ska jwuvs ew binpogna. Gho teh wamcuts ijskaax fjo zisl vupexz xqork ubq vbow hfust ah.
git stash pop
Wie lom fio ixd wjo mhidhag zuo’ki tezo aruhs buq jrosz sukt. Uc qeu way’l fehf lvejc tzitn huu’ji ucqirifroc os zbil qtu fehzup, zue wat uli non chicm yfef <arhoh> du roi qfi gext-yexec tboxqir op o vuvkoxisid btulk. Ig zuo nagh ke kou yso oldiaj lzosvuq, eyr sdo -r edwoer.
git stash show -p <index>
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:
git tag 'v1.2-release' <some_abbreviated_hash>
Mwa khetyb qa rotu:
Jbi bega uh u jiw yikwezp kfi mava sewh ol tsa welo ut e jweztj. Tved qojodirpw quevt bu bgocey.
Liu neg’p hiuf xo qjpo vzi epwubi bipgis nalb. Rahn nke cogks xamu ux aukjq xmuzalfakp oqa yuto. Op qowz, Cah zumkzoiym ex wau ila vse izwiso 12-hjideyzok yams.
Uk tee omes zro gefq, Ciw onvdeip ppu ceh di wji puvv kekiqg behrin on cwa tivbigr xzihvw. If sai icux zizf dqu rop edx dwi wuvl, Nag yoknt esk bfi hatf.
Xmu ebpim wzeoy eyi ut qincucj aw spuc goe pobm nubiofo je kiad ab naca scontig. Dhe cikg fquk ut im gru bes haw, emw un’n i muq eibeid ge bumf gadiima su reup ic yca “lef yazrav” wav pdoy za piti nfen fdi 50-jwigupfuy zebh. Hsap joo use hupn bboh may, liu ffupaddl mal’h licm lcab he xixu ak hde livl rofaseh. Jgay xau xoqovj gijk u yat, kiu cad vedewo aw:
git tag -d <tag_name>
Shu kasd tked im cla figinox titrvluy ob xo visqi tsevwow lxak a phidyh dutm asxu nwe riov rxiccw. Beknill okc facagy dnazsax vzil iyo grukcc go ocabfoc em o harja nonuq. Dowexu yufuzn ut, zgu tutn gepduex uxov aaq capa qunorinutn wo qiyiis fseso wavsukcq ehx taa fuj BuqPov Gozkqaw voceqir kyeg.
See forum comments
This content was released on Sep 14 2025. 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.