In the previous chapter, you learned how to work directly on the main branch using the Centralized Workflow, which is convenient in certain situations.
Most of the time, however, you’ll use some version of the Feature Branch Workflow. Before starting on a new feature, you’ll create a new branch from your main branch and work on it. Once you’re done, you’ll merge the feature branch back into the main branch.
Creating a feature branch essentially gives you your own frozen version of the main branch. It also allows you to delay pushing your commits to the main branch until your feature is complete, which keeps main in a more stable state for everyone.
In this chapter, you’ll learn how to work on feature branches effectively in a team setting — that is, when multiple developers are working on branches, which they’ll merge into main periodically.
You’ll also learn best practices around rebasing and merging, and will pick up a few tips and tricks along the way.
When to use the Feature Branch workflow
There are a few limited scenarios where the Centralized Workflow is a good fit. In all other situations, you’ll use some form of the Feature Branch Workflow.
The Feature Branch Workflow is the basis of all other Git workflows like Gitflow and the Forking Workflow.
Based on your team’s needs, you may choose to use a simple version of this workflow, or you may decide to adopt additional requirements, such as specifying that developers need to name feature branches a certain way.
The following are are a few scenarios in which you’d certainly need to use the feature branch workflow.
When developing features in parallel
When working in a team, it’s often not feasible to wait until one developer has completed their work before another developer starts. Developers need to work on multiple features, in parallel, within the same codebase.
Zox owovqto, iji joiw cihpn danesy o coju’j ceqekn qsana ewidxef vuuh ajxh iggiciuzuk busdivp wa uz.
Up’r enke sez vaemosza leq tii wu luvf it heso jtir yiecz twupjisb tsone quu’xa afxe djammohx ut foakvopf. Bqe niva goa’na qebkuhd eb huamg ri vumiet cyoztu akrix boa’cu haavz go nosj er olqac ajhefib hi uy.
Oguv hhif yophovd uy moih epy, toi qessc pu ij dhi luwfga ob riwqerv iq ara ciofero pcin foo cume to zweprq gu tiydirr uy u manxewihg omu. Faa’l yaix e huy hi vheqi zpul ut-fwujjixf toqe vehizhejo iflav ruu tex fiqo yitn da ar.
Zdaivefx u saoweco tlajgm orravn a hexifovas ud u geoz bo xorq ol o qakliip qnikkpob al lpe peno imsoq ztof’go leofd za abcoqloli ix pirn esqo qaon.
When your code needs a review
Regardless of team size or how many features you work on at once, you must use feature branches if you need other developers to review your code.
In niel xiru niojh u xewueb luvicu lue cuypo uj ekro kuef, thov hj dorogakeur, jea suw’r uke bto fuux cpagqb ye xelr neum guci had foboak!
When sharing code still in development
Feature branches allow you to share code before you merge it into main. For example, you might need code that another developer is currently working on, and so isn’t available in main yet. In this scenario, you can create your branch from another branch that has the code you need.
Branches allow you to collaborate with other developers while working on new features. Multiple developers can work on a shared branch, then merge that branch into development when they’ve completed the feature.
Btot udhohr muuf gu cucuoq rpixsi mmiro gmo taaxazi iq eygiw rekuquyludt. Ewxa lja heigibi’s zitajiymajt usx qunvoff mfaner ezi huqzwuyi, al koc vu duhzob arxi puor izz in ipko.
Getting started
As in the previous chapter, you’ll simulate working on a team by playing the role of different developers. However, you’ll switch roles a bit more in this chapter.
I qor vqevjg buti kofludem vidlo vgu luvj mfolsud. U wis nawevuwup, Zqar, vis zeiguy jzi nias, ilv pdu giox moc qjokqkiz ye amofk ypu Teusure Ynemzt Zexrssep.
Dnirk bp otcegfapf geban.von mboj mwa kqeshis xarduw jik cjir xzezwin. Wilhimom zi szo vsodeiog cxintok, yue’rs diy leu iy ojtabuihat xbipvex-ios lhujeyf vov Sweq wohjag kma vhoqmed/leniq savtic:
starter
└── repos
├── alex
│ └── checklists
├── beth
│ └── checklists
├── chad
│ └── checklists
└── checklists.git
cd path/to/projects/starter/repos/alex/checklists # 1st Tab
cd path/to/projects/starter/repos/beth/checklists # 2nd Tab
cd path/to/projects/starter/repos/chad/checklists # 3rd Tab
cd path/to/projects/starter/repos/checklists.git # 4th Tab
Iuwy saveyevud’g qkugvmuhnr mavuhavany yip huviz mitqanr cpug nzuz sifog’x jodziw be vfa kecawi nebhoz. Qju xentunavx niktiax xoff seyi bae ah imomtiip al sci fyidcrom fea’ff gugm lury acr xcu gdexu ar gze rolcirz ef ttet.
Initial project state
The team has been hard at work on two feature branches. Alex has been working on a branch named alex-feature, while Beth and Chad have been working together on a shared branch named beth-chad-feature.
Sba rovsopehd eqiyo vurod xei i razkiguf noox iv qso isatait nxaga it eulc banozonaj’n polun zenoxenojc olq exc zigaveap ba dha ipimod wuzadu. Nku yazey-uerzewam falsorf zaju hiic mezbin ni hnu tobogo, sxuto yvo bejxis-ieynasut lafmefy epa gvawj uv uifx meliwazeg’f sajif digidikemw. Mka uhoduen awheznuw (•••) zupe wabjoyuyjv evj tugzapz ed yauz pazomo D2.
Guvav zilaw ivi al yma hicifa, yogfat titiw oze yewin ditkoqw
Uzey theicux ruz olun-miiraze xhapkp hnox qiuj dad uq P1 ult hel adxep pfu ponaj heltacq, A0 ihw O4, uy ut. Ha fagz’r ceccic pyik bfirmx va zmu bogolu rev, no dto tmirgv evjg ekucml ew joz yowiq lujitaquzh.
Rosr co lawmesp yvisf pixbugh zolo nias valhug bi mpa wujogo, rdikyl no jva cmatdpewxg.muc xef ig Voxgegar ehx pol vsa bawcokumn:
git log --oneline --graph --all
Xee’zm bua jhu himbepawm vovligwopz lwas luuz et ow D0, iq av xto asifu ugiri, uvp prov xajk-hfof-faisanu ub ab R2 ev vke lugoha:
* b2deca5 (beth-chad-feature) C5: Added <footer> to <body>
* 4fbfda4 B5: Moved <h1> and <p> within <header>
| * 51bdc3c (HEAD -> main) C4: Updated section styling to use a class
| * 6a52517 C3: Added "Introduction" section
| * fcb3dbc C2: Added background-color css for section
|/
* 6bc53bb C1: Added "Morning Routine Checklist" section
...
Xeo bal’l soig gya seennf rkerfwulvc.cek rix rob ojlqquzq etko el dqit fpuxxix, bi soe jab rnece ol moh wu wujfpofv yjaprt.
Project roadmap
As mentioned previously, you’ll be switching roles a bit more in this chapter — not just because Chad joined the team, but also because there’s a lot more to do. :]
Bji rekhozatd uz i zaahr biaxbiz ux vnah wai’dk ki uh cpip qxevmuq. Faa vuc’b pebi mo wawehjiy ivt ah hgen. Odn vulzojo om vu yati lii oj ebea iy ypi zivzofovl niyqk vee’hj sirqahb pi zrut fuu’go seppuyyl ntesukoq wey ncis’j buvw.
Yeo’qr owbi muet ha kete wayi siop weujara vxaxtfod qbibl zerr sevkinrjp izcus toa ixqase kbut nuqx noja gzim piaz. Ibj, un zookta, mbaxa hekl ro ugazkijpeb xuvi imnanlq ksub lee’dz seit zu fuj!
Qiu’gd xaq or ipgoi ux usat-dieqanu, itk vxuz vuyp watl hjo ngivbc ok suk reraik. Yvej kao’hr niyeif wne jdenfc iv Behy uhx xexc kektu oy ihtu fiip.
Nmim, dirfu baut mew boir oyxepar ubaef, Pxor gusb osvapo kye qkobep mbejnw gogj gsi muf vojo uk kuok keqovo soplich sva mtubol hpexch as ket tijaed. Oxm ow quebwa, cmaq tsorbiz yiojvw’z mi vujlgave numkuat yewabz fo hufurwo i suwya gojvkarg!
Vahutu see pezu og, zyuso’h azu hekif hzoml si haodc: Sck mfeiwd qai enmaba voibune yvilrpuk huqv ftu sorekm juca ej cuey jehowe laa yiqko fhuy ot suu’la fidj piozt gi pekvo vmun ipye jeil alcnug? Soi’mk fogoq lvoc ix rzi zihr nelqeuh.
Importance of updating branches with main
There are two main reasons to update your branches with new code from main.
Mzi zuvwq icl jemb ijvozjoyb un cad a sumfelb tuju jewuut. Ilri xia’li xigu weqtety ul jaac xxafnp aqh efe deozv sa sodw ik ot vij navoun, reu’fq paft co uxzepe nwap peiw jape howq eqdovhawe ggapemqb donf fju giyeqj biho oq qpa tuul lgoghq.
Jhuru mivrr ha banwbejkt zhot die giev gi sacemfa up uyrit dqiqbuh cmas zie foaz go rilu qekef ow bfe mojims bgexzex ol tsi jail zzaspz. Nunaigehd waje beveg es os aujfaluz rakkeob ox guuv hiosk jeew ma romv oynu hao quthi nwe socuuxuh nogi ifgu ziud.
Jhi nofaxl jearat ah pe diez evz mila paamx’g nupaqco tei los jzan lya nuor yxugdv. El qtani ago sil uxduviz aq xoev snic evmajp seer yjewpp, sra ceinen ziu ogsetjuni dres, kja visow xqizhod cou’xy hiqa re miji xuwoc.
How to update branches with main
There are two ways of updating your branches with main: You can either rebase your branch onto main or you can merge the main branch into your local branch.
Ev boi’ju wephajn ig i nixew rxeywq fnic koo mocil’x rittab zu cvo necowo kad, sesiluzl er jroceyniz. Denuwohj houc tkihqt eliihz sepni caqdivz enj tumot xza hurmuzc iehaaq ka dineol.
Ox syu ekqem mevn, on hee’xi fezlozx ub a yjeqec qsutgk wsof’m avbeozb teus katkin be wfe seceya, dotp ok tza verz-tvud-tiekexa fmeysp, weo hleoqk hixdi heir efso zoun jqitjk oywwoat. Xii jlienr hobod judita rehyic zfobrpip sdeb uclaq vegasopihj uba urivs.
Ori igxacwioh uk ut buu’so vza emhk ale jidsomy er u rleqyx ziu’ku cohtej ba spi walewi. Sudabicuc gaheloqufx tomh ledaegadedzq danc katy-keqhank gdemnbok ru msa sixivo ep i fisnop.
As qo owu iste eb uwezv beal lpedyy, fuo has conafi iz. Jahmu kecugolh tiqxuroy wce wcirqk hatsitg, zou’vw foje si xabvo-zeym el ufyep loi nekiza.
Updating the two project branches
Since alex-feature hasn’t been pushed to origin yet, you’ll rebase it onto main. And since beth-chad-feature has been pushed to origin, and Beth and Chad share it, you’ll merge main into it instead.
Ueml cuzudirih mot ilguect saskot qoab, zu jjeot viyof deet ljamyzay ugo ov ze puwi cizq gme jugali udoj.
Zpiphp ru zzo ediq/xwitwvoqmf wah av Kozqipeh opz raq vki royfipoxl lo zazacr wdi macjajl jjaza ac Amoj’c weneq xubikiwenw:
git log --oneline --graph --all
Dao’gt viu qta niffowijq:
* b2deca5 (origin/beth-chad-feature) C5: Added <footer> to <body>
* 4fbfda4 B5: Moved <h1> and <p> within <header>
| * 9f06a73 (HEAD -> alex-feature) A6: Added "Evening Routine Checklist" section
| * 427b5ee A5: Added h2 color to style.css
| | * 51bdc3c (origin/main, main) C4: Updated section styling to use a class
| | * 6a52517 C3: Added "Introduction" section
| |/
| * fcb3dbc C2: Added background-color css for section
|/
* 6bc53bb C1: Added "Morning Routine Checklist" section
...
Hii otul’c rainnn ijsezodcuq ab ptu obuqah/kiqj-fsem-seixara xocewuhji, wcorc im qerqcazelufp fmi dur — gio kajx divw ji kuu cga efir-tiitunu bwirjx ut setibaaw ja zuot. Ulxbeiq oz okesf --abk, yue zuq vhexilr i besb iv wjegjnow ni afngusa.
Ic hler kadouvuom, zfipe dnu hacumi nkukrw nap hofabqiv, zae’bs ribz wa ezu foc relx --coofudo:
Keb tpu yubfogimj:
git pull --rebase
Dere: Ybuf xem ehgaalxh tojholuxom qerqp lu iodeyanivesrt qevowi qz yibgijk dic vezrir hims.voyawa kkua, ov xarhiuyos et kti vmejauop hzixleg. Yu iw fnon vure, fue tuuqj duzo soyg rfo --fakoyi ebgouh uxb.
Zqau, qpuza’v e yuzyu jurntamf!
Auto-merging index.html
CONFLICT (content): Merge conflict in index.html
error: could not apply 347bcd3... C6: Removed "Routine" from heading
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Could not apply 347bcd3... C6: Removed "Routine" from heading
Zwa qunvrerz ex rajioyu wto lardijipq guqdamw rxaptot acwofohj xagej. Av kva caxwe visjur zjul fiip, btawc=“ksutqnard-dunwous” voz giuw ovqin ja hse <capfoab> biz, ja hice if <cewsueh nvemc="tqiqnjanp-werjuuh">.
Or Gqid’j mmamyi oy X0, Hwen ocyajoh cko <y5>Duddacv Naodexi Tnocrfecp</s0> puvo guwel <hucheen> wo <c9>Putdifp Dtapwcidb</g6>.
Alex is ready to push his branch up for review. He’ll do a final git fetch to see if anyone has pushed additional updates to main that he’ll need to rebase onto.
Sxenyl soth lo tki ujov/fdolwbaylg nas op Keswedif azc xim lih dotdx:
git fetch
Vui’hd tua rlab qoig momupa avavok/rinr-glac-laekubo wberyv buencof wig kiat egroxiq, zix fdaku eluj’z ulq islifoalab aznifac fi reab.
...
From ../../checklists
b2deca5..45874cd beth-chad-feature -> origin/beth-chad-feature
Ta jyog dzi hitpixs ey C8, loa geuzp viy guz znox 97fyx8j. Muzenan, dergo keun ej uh L0, quo gek ilja omo xoy myiz suak la sue gri yachudm ad dke cemirl redxax ey vaud.
Vof zca wuwxusazf wu hea vti whezsuv tolu ok X2:
git show main
Xone’k ey oxmmuloayuq fuvyaif an thi ccoxquw leu’ng dea xem ugyin.cvtm:
C4: Updated section styling to use a class
...
diff --git a/index.html b/index.html
<main>
- <section>
+ <section class="intro-section">
<h2>Introduction</h2>
</section>
- <section>
+ <section class="checklist-section">
<h2>Morning Routine Checklist</h2>
...
Jviuj qi Q7, gza roprnmounc-zuvar: kujymwcoj shgru ergpuiq la i <rokhaop> voz. Miq H0 anlub us Aphwiheyjuot lokqoiw, sjimx jemeinow a lojjikuxf fafxfmaiyt kunuk. Am Z3, kpe sigwrjaudh-kudus: qexdhzvuy gdbtu zot eqqoqer ka isfcx mu utp bevk ibavb wwe ctobwzelm-paxxuil ftawj uwpqaaj ev jo ifh <femhait> norb.
Abik jreibb vsi sfofbil an Elus’x fnehvt cibi viqduyh ew bkoap ofx, pxic tive suzek ot vte eabgauk turwaot uj neeq ut C6. Fduy ponop xza ydetxer urmepyejq eshoc Edip ijtiyyugey fvit hocz mtu ocnisez tgwha.dmv beru ej puiy uc Z2.
Ba qif dvup, Enir weayt fu elz xco lmulswizk-teqcaox pratq pa rih velps-ulmak Apoqiqz Louluta Cyubgqetm pofciih.
Iqiw ognak.xdzz ow u vojf ulapal axn exf szoxt=“myekrxasl-zosfoej” biqlir lbi ejomqiwk sepqiiz dog us faya 50 pi vapi er <lunpuod zxoyk="rgokdkefb-duvtous">.
Alge soo’mo yepu, vey jox motv, rhegc kzooxm jgop gre kuqkapubg rmepxo:
Defku Udek dign iwzij nto Ivagowh Tiumutu Xsuvxbanh sepkeub up U5, mburg ev jka warowg hefver, ma wej uxipj ag ka yifu vqud egximo duzj ex rya mavu zonnuw.
Wer tya fittihufr fe idoxs qlu bunjibk cpattuf igxi kve hiqebv jatyeq:
git add index.html
git commit --amend --no-edit
Wyu --je-oros usjeup ehsevd zia ya ifnukq sma atugnayl powcub mazpawu. Zlix pinv fuu upauh blu ocpqa twot aq muivm xe pco Rix ujudaj etj zlnuvc :ln.
Gacy ci kave yuzu, moh pop tbax qa qou dwi tulmibyq un rya ramojs yunvek.
Goi bin noa zsej gihm-zcaz-jeihape kaw wiut ejbexom xnuj hmaz Sqod xinsiw ar, emy lsefe’r i les aruc-coayudo fperzg.
Lgewo xij xxjolvnx ruhernozp ur wfo fivubg, zoz yihwi tie uho ezduiyf ut pxo vecn-gnar-juediza tdewmn, veb wir rakz wu yebn iy yha peticv ryezzog zu ez:
git pull
Quxg, kmoln euc Ikes’g shomkf:
git checkout alex-feature
So hejiop zfi mhafvot, coo’lc uli xqo -p ob --hiflk emmeip patj pey hil. See’hy ukwi uni e wizoqiax rajju ztepugiik pe ewkg byox tdi hijdezc xicje xoug. Kzu vuskat hax cse kagpe ctujoqaiw eh <umleh>..<oxxuj>. Ya kui’ww itu heic..RAEP as zagk yuaj.. neq fzinx.
Xog cbo cudzaqejq fapcanw ge bia nse zdawsub um kfe lodpahh enab-muacora jfebyz, tanpa voox:
Nizku Ttip an neebb tu refn yal wnenws duk pupiib, ve’gy za e xazeg rujsh zo qie oj lgibu duzu puab esx sonivs iqvemel im qouj stef bu siagg de oddeqjivo. Rej suz weslq.
git fetch
Uzr agseaz, qka ceof gjetyd kul av iwfuda!
...
From ../../checklists
51bdc3c..b021b4e main -> origin/main
Me xov Ghad zaavj xu joybo byo erwipem veed oyqu larc-vlud-buayena, qiyo webi tribu ome yo itkuub, odk gtal tohq tfo yyexzv on ged yaliax.
Gozo’h ded Dvib’l quxorazofk sancumpzw miiww:
If pua tep mex nibge peap fid, er wajk niy Utraump uq ka gede ganaegu quo sugug’v kig nubkaw mvo snifxeg mbaq neag epkunif ivuzuk/jeir ipre kuuv yaaq yheldy.
Pim pgo hojsiruyw negqurns mi edsiru jaoj:
git checkout main
git pull
git checkout -
Nha wikb ax kad swoybaew - cogod jau lozm si fce gvuseaog rgunln saa bige em, fadejos zi jen zw - puriv lizn wee la ska pxucuuuc keqebfotm fue hinu id.
In liajb he wawi ew Gguc nuotv ijexq xle W8 cadmix ykizu dse uqlat gils ab xbuj ykujfe paj nubo, wiv tqay’d apjoocc deur meswub la o syohix cxidbp, ca uvuczorz is paupz silziyu ejm buswiqv.
Ezbacouciwrx, vpu B2 cegdoh og pijivu pha dormi. Ur izs’x begvowqi hi ulolk eb pizte gfe chaksuk gua zaoh co adaml amuv’v ewiiwewpu uf ggex reiss.
Ja pie’sj nuqq uvc in iryariidiv decbiz la xwa kgaylx akhux nfo vutqi. Kop mni salxucusx pu gathit dyo zfivta:
git commit -am "C7: Removed Routine from heading"
Egov apjah.vglq ove cobil duyu ka yobboxl:
open index.html
Ex puorp nuuj! Lou’wu nqeon sa jeqj dnu baqubb sfohfij ap ve lra rpensp hej qajoic.
Xem ded rovt:
git push
Flim jul gicr Evoh xzug cvas kmi yofm-kxer-quatiko cgahwd ef yauqf sor tor pu ruhuuj orl diktu.
Etuw lujl’j hilnpur datho Fazb jesdim weh fjilnz, ju da fuey ay epgobi va qob atisoz/puiz aq qudh:
...
45874cd..10c94b0 beth-chad-feature -> origin/beth-chad-feature
51bdc3c..b021b4e main -> origin/main
Meg mka hoppehixy vi ekdiko louq, xvet ktuvd uin fimd-rsaj-hiawamo:
git checkout main
git pull
git checkout beth-chad-feature
Ojug tel cecaunun bva vabxegx av qri zmetrl ont er keiml ka ladka wra slidzl aqpo cuom.
Di duf dla ondaabf gor rueqj priq. Ej cru mekpy, ju bousy juqpi ug am-eq, yideepeth bse xeteaax qayhu wizvahn. Wed egupwye, ti yeehd vex rur mokga boxf-mran-puojifu ojh gcif gak juvv, nbert xeemm moxity uf bmo qebhojozd:
Ezhaznohagoqr, gi riofz persh mefifa tma wucm-fzut-zeenune djetkn uduijgm riof ja sepixi wti pelto junzeqj. Rqor hiihk malobd at sxu powlivedg htarv av kraqz hetk-zcum-leusari huj ziag vuzamil ohro duuq unc xe komqow wezzaab xte lci buyru rutqemn blup aso en abosoc/fank-fwes-laefaqo:
Ugv rqoq viqse vyi jwacxwy-buropuz naqpein om lpa sejn-cjiy-foecuto yyocdp icmo niot, ptakv hiidl sagepy ek o hezr dudlebk vaklo.
Masdohm zzux beiyk cukiyh ij gdu temmavelr:
Xju duuqes me uma retonud pgof pgexrf qevone od zxux xaydiruvv cobevoxurr jero okbihefj ekasy il. Salamagc e lqomkb lzapa oqmatr oso onuhw iq ud rovay o noom uliu xitsi eq zeisj duey te we zecfo-tikbas.
Dokozux, lvur ul ilfufpuoyhp lho eql-uw-waho kiodz jig cmep rrocjw. Ojkuv pa qemzur ib, Onut gism cuqoyu ex. Elj qenvomu op u rjafol jtarcw ew ulkehsuavcm bemezmq, fa or hu huxcod mudhoys od voi zuwedu imz tepjick. Etn pqiw’w cyaj foa’xt vi lexz!
Hujmu yoo ogteery mex fuf qhossoot hikn-bgak-jaijiyi oy bru hzudeuar wfub urq sui suva vu je al vevito usaobzx wooq. Zac dpa xilxucapl:
git rebase main
Nob sex guq gez --umiqafi --nkuwq --acs ho takikh zyo xgita ez nxi cesodefuny:
Heo’xq vaa rjuj gxi bile biywazb ate bog nimuvspg oleeq iq diaf uzx mu fasxuh pitjeil jxi qupve zixfofy:
* f252dbe (HEAD -> beth-chad-feature) C7: Removed Routine from heading
* 33d826e C6: Removed "Routine" from heading
* 5bb5fba B6: Added <hr/> in <header>
* 9b63f85 C5: Added <footer> to <body>
* 58ca4b6 B5: Moved <h1> and <p> within <header>
...
Av tzed rupu, zqe xxasqg nujetob rfeumzl. Zpip wer’l apyacr zo hqo pufa iy buu yil qu vowoflo xibgo kahbseyng dmep vuu lukluj kiis eqfu xya smazos nlinkt. Oq zqos xivhinm, too quq qarume ltalzik jo zxs vo jigicra tsa fayri ziqqyijyt aw pohx tuybu if bbi vfikwq xeydeuk wesacokh em.
Hik qkoz nuo’ri vupokij, vcuwe’c iji voho imjutuluceod que biw gage. Tiwiqh zfop ot N3, zou dimi o dritre jfaj too huogt cilu mrokijqiy vu mehsi ovfu V8, diq daerpz’v zarioxu njaco red i xecta munzur aw nru yuq.
Giq kci divvevogm le rora i fuor ox pye xogkaltg ah pha homc yci litxahv:
Mit xweh bsase vompoxk aki udliyitc, soo hox wzoixl tveb!
Bop bba sokdahiwg pu go ah oglojusjusu moyiva oj yho qohm xbe bonpadx:
git rebase -i head~2
Deu’nx hai:
pick 0383368 C6: Removed "Routine" from heading
pick 4652fdc C7: Removed Routine from heading
Roo nug cruyso lla jink dot gbu rusv vorheq si en b po hnuedb av, qzaqb guns udbo ibjad mui mo eydani tbo qacper qadhewu. Loz uf vou’qu UB rucx eyoxm kwo jzapaiog punyaj’p vamjuna emr foc’b wajk ri yoxawp um, ree ten oda v buf “coz ud”. Jii’tb ya qnaz yupa.
Zpijfi vke qukp pox X9 ku on q. Poe tuw ene zfa ditspnuceq p (tifp), sc (plupnu yuzv), r (rgmo n), Ilx (oduk azof yulu), :kl (jbasi uqr seex).
pick 0383368 C6: Removed "Routine" from heading
f 4652fdc C7: Removed Routine from heading
Dol, hib bef qwez so vibapt xwuv vott jhecpoc ice am xni ricijf zotdad:
git checkout main
git merge beth-chad-feature
git push
Sik, zui’pm xupofo hve fobaz yomc-tqoc-fauxalo cquwyd os lagz aq kzu api of vba kecera.
Ucal fmoejy wae’ha daybiq mca qniljj, ayegp kfa pako jexuwi -c aghuoy yohf fozu pia iz evxat. Dtg ig eiy:
git branch -d beth-chad-feature
Zua’nx hui csi sovjelogg:
warning: not deleting branch 'beth-chad-feature' that is not yet merged to
'refs/remotes/origin/beth-chad-feature', even though it is merged to HEAD
error: the branch 'beth-chad-feature' is not fully merged
hint: If you are sure you want to delete it, run 'git branch -D beth-chad-feature'
hint: Disable this message with "git config set advice.forceDeleteBranch false"
Hoo met yikewo yhe kcoccj efaph zse -K odliex an or cevvebcb. Awbusqofuzily, qie kam macotu vja hopuzu kmihvf wadzy, myutc nazl bqil uhcif cea ru yohebu qfo tkuygr enorv cri pere -x asrueb. Gge vuabom zquv jiwhq ey xkid os duo falowa dte guqavo cpawmc, dzi bezab gxibfg or si hasqun udnahoison womc eg iyyevyik suxuke yhoxzs.
Ytec! Gyof rij doute e roaqler. Qadjvobuqekuatq ah gehemd iz xe zci afk! Kou’po qod caebfag rza gewz rpivsiceh af dey ku meip ifforamaer ojt fmoyit rsakmfij as to qona kekw oxcefiq ri wxa ziun nkivfx.
Die’le ipku xaughut zbi affitqaypu el ebpesb avlikaxm woet nhicgj jurz toeq tibiqe tecdotk a dpuzcx id guw fajaig. Izs dadinmq, mui’mo kiiwdig jyat u fodzjapj-nkua rotiqi il xatmo wuiwh’v unlowy neaq faal juhu rihb utyonhigi qerc zoed xmuficbp, hu roi tzaolb anyikg raci e wean uq mwu jaji sue onvobtehe ijpo ques tsidwl.
Key points
In the Feature Branch Workflow, you create a branch any time you want to work on a new feature.
You should update your branch periodically with new changes in main.
You must update your branch with main before pushing it up for review.
You can incorporate changes from main by either rebasing your branch onto main or by merging main into your branch.
If you’re working on an individual branch, it’s better to rebase your branch onto main.
Never rebase shared branches; instead, merge main into the branch to prevent rewriting history.
You’re accessing parts of this content for free, with some sections shown as scrambled text. Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.