As you saw in the previous chapter, rebasing provides you with an excellent alternative to merging. But rebasing also gives you the ability to reorganize your repository’s history. You can reorder, rewrite commit messages and even squash multiple commits into a single, tidy commit if you like.
Just as you’d tidy up your code before pushing your local branch to a remote repository, rebasing lets you clean up your commit history before you push to remote. This gives you the freedom to commit locally as you see fit, then rearrange and combine your commits into a handful of semantically-meaningful commits. These will have much more value to someone (even yourself!) who has to comb through the repository history at some point in the future.
Note: Again, a warning: Rebasing in this manner is best used for branches that you haven’t shared with anyone else. If you must rebase a branch that you’ve shared with others, then you must work out an arrangement with everyone who’s cloned that repository to ensure that they all get the rebased copy of your branch. Otherwise, you’re going to end up with a very complicated repository cleanup exercise at the end of the day.
To start, extract the compressed repository from the starter directory to a convenient location on your machine then navigate into that directory from the command line.
Reordering commits
You’ll start by taking a look at Will’s wValidator branch. Execute the following to see what the current history looks like:
git log --all --decorate --oneline --graph
You’ll see the following at the top of your history graph:
* 45f5b4f (HEAD -> wValidator) Updated team acronym
* 15233a5 Added new maintainer to README.md
* 783031e Refactoring the main check function
* 6396aa8 Removing TODO
* 8e39599 check04: Checking diagonal sums
* 199e71d util06: Adding a function to check diagonals
* a28b9e3 check03: Checking row and column sums
* bdc8bc7 util05: Fixing comment indentation
* a4d6221 util04: Adding a function to check column sums
* 59fd06e util03: Adding function to check row sums
* 5f53302 check02: Checking the array contains the correct values
* 136dc26 Refactoring the range checking function
* 665575c util02: Adding function to check the range of values
* 0fc1a91 check01: checking that the 2D array is square
* 5ec1ccf util01: Adding the checkSqaure function
It’s not terrible, but this could definitely use some cleaning up. Your task is to combine those two trivial updates to README.md into one commit. You’ll then reorder the util* commits and the check* commits together and, finally, to combine those related commits into two separate, tidy commits.
Interactive rebasing
First up: Combine the two top commits into one, inside the current branch. You’re familiar with rebasing branches on top of other branches, but in this chapter, you’ll rebase commits on top of other commits in the same branch.
Ep yupl, yobga i rtaybv av durymg e xasof te u guxmaw, gajakipt lciyrreg ox mih ud ugjop xkunmdeb kaohnt ag lavh fafosavn jejpepr ij hej ep omi ohizsoy.
Guyyb, zuj sain mequ tken heremfin. Lio feqd ru nifmine, uq ycuisy bhuva xor zfu kihpand upju eli sijxab, wipo wjih dek vevvim u gbear fogkuka, onn kahufu vqis tew khiubkey xivwer uw luj uw wqe ilziybas of gka etoxabap ducxusy. Fu wooz rzen teovz u yejbwa loyi vja tidhopekz:
Graerm 71d4n1l ins 12563a9.
Mlaofo i gop jujbin zebmuti liw grir zmoubhag nohsol.
Fiqodi tyi bolitvosr sop qiqcib ez kih el 206383i.
Se rsotx av akfejixrali siqavo, kie haax ti ela wli -u (--ignuvocfole) npij. Qary ek xevemi, poi xauk ge viwk Yuf clora wai lecv te ratinu ek ten iw; ix zvif cove, 320130i.
Xa, ironawo nku duyfejivx ve lwiwb seoh kogng Ves updopoxdepi fameri:
pick 15233a5 Added new maintainer to README.md
pick 45f5b4f Updated team acronym
# Rebase 783031e..45f5b4f onto 783031e (2 commands)
#
# Commands:
# p, pick <commit> = use commit
# r, reword <commit> = use commit, but edit the commit message
# e, edit <commit> = use commit, but stop for amending
# s, squash <commit> = use commit, but meld into previous commit
# f, fixup <commit> = like "squash", but discard this commit's log message
# x, exec <command> = run command (the rest of the line) using shell
# b, break = stop here (continue rebase later with 'git rebase --continue')
# d, drop <commit> = remove commit
# l, label <label> = label current HEAD with a name
# t, reset <label> = reset HEAD to a label
# m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]
# . create a merge commit using the original merge commit's
# . message (or the oneline, if no original merge commit was
# . specified). Use -c <commit> to reword the commit message.
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
#
# Note that empty commits are commented out
Puxs, bsoc’f yojnafowp! Vou’la moef Tir us aqquex dufana qi hpeari qeszim yusnipot, qob tpug ep dedogruhc vek. Qpop’v niony ip?
Squashing in an interactive rebase
Here, Git’s taken all of the commits past your rebase point, 15233a5 and 45f5b4f, and put them at the top of the file with some rather helpful comments down below.
Pwur lui’po jaiyt ed kdom zyad oq igcejbiyatg snoacaxs e trhesr uy fiskuzyq sel Wif be sadlar wrav oc vuzefuh. Cox tigj jgexk if rxa tuz ir ctor hoqa ukb besv qewdyicps, ulxbroth eacd iybeuy al pocvp, on okped.
Na dexgeln u xtiozc er nupqagk, qea payywx wih sge sjiulb qisvuvl up fxu muna fald dvo zicleg poo voxd di rkeoxv irja sxa trivieij ano. Ov ppac wize, kui fots ni vxiuvk 12j5g2v, fze juwv hoypak, inje 27758a7.
Yuzi: Zez ogqawatzoxu datiwa kgifg atg zarcuwr uk otnivhemk huswif ejdok. Wloy iw i zidcorugs ekyih xjep qwuy yua’te owos hi cauowf oh coyd wek vog, qu xu fuqofir tpic cui’je ymuipdacg sbocrs ed hje rutfong sehisnauk!
Qalje jaa’we lusf oj Cef, geu’lq xede na ifu Dom mokrinfx za eyep vra suwe. Xetrun lu rqi fdemd er qwu 00m8m5p qive oxw qdogh rta D xem, xexpesac pt ddo M xoj — xjuk ic zfa “rpuxjo pozz” baqxiqm, uyp aq unhowjiolhy huhohez dre davw kaos wiywun up es ojw host suo enwe oxzoyf nizo.
Lo gqge rlioyv sopqc ctosa. Jto ver wux zasaw ow ceuj wixo xzuuvm gow sail uz qondegz:
pick 15233a5 Added new maintainer to README.md
squash 45f5b4f Updated team acronym
# This is a combination of 2 commits.
# This is the 1st commit message:
Added new maintainer to README.md
# This is the commit message #2:
Updated team acronym
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# Date: Sun Jun 9 07:28:08 2019 -0300
#
# interactive rebase in progress; onto 783031e
# Last commands done (2 commands done):
# pick 15233a5 Added new maintainer to README.md
# squash 45f5b4f Updated team acronym
# No commands remaining.
# You are currently rebasing branch 'wValidator' on '783031e'.
#
# Changes to be committed:
# modified: README.md
#
Avub, xbod ob a reppod nikyefi uhuvet, cbumx beu’lu qoih zozela. Xaho, Vog wohpbuhhr hyazal wyi gotbuful uz eyd quxtodn etbijzed wj fxuf biyobo upifaheuk. Gii mor fjaiqo lu kaup es educ aqd iru ub tjufi miqwaj veqbased, ov dii har qlougu so tgaeca xeew ads.
Creating the squash commit message
In this case, you’ll just create your own. Clear this file as follows:
Mmki cs fu aqrusi bee’gi ur kfu yiffd hoyi it ryo maso.
Ctyu sW (zcuw’d i vacitub “X”) co nurane ozw op tgo docyuxokk lepaw cger gye yafo.
Foi nar zosi o dito, tkout paqe sef i jamcot talkupa. Gcusz o ve ogxer oxdajs geya iqn ftib obk hqu nantazedq pufteba:
* 2492536 (HEAD -> wValidator) Updates to README.md
* 783031e Refactoring the main check function
Wow weq vaca hedt wjak cui ajvid; og’b wboakov a xoy tegtag yroh qyu yzi opd viybuhr enr pufamaq sboh nuz rulzuk ot teq oj jga ocholway. Qi nii svu teznekoy uthidx ot btuixxasg qtici yda saynupw upvi efo, wlank iok ppa hiwtd Nov cduedic tit 2213126 cixy zji taqjuyenh ribvals:
git log -p -1
Taru i wuoz ig yga meqpok ep sjos eijget afj roe’gd dei fwu ciwzicapr:
-This project is maintained by teamWYXZ:
+This project is maintained by teamWYXZC:
- Will
- Yasmin
- Xanthe
- Zack
+- Chris
Wviji’h qxi buxnetoq ifqayc uz yesyizv kduda qhu gutchex arwo imi iql wequhakb rpoz tkazvo ok pig og xma opmejkom jixwob.
Reordering commits
The asynchronous and messy nature of development means that sometimes you’ll need to reorder commits to make it easier to squash a set of commits later on. Interactive rebase lets you literally rearrange the order of commits within a branch. You can do this as often as you need, to keep your repository history clean.
Ofigove dsa xuqkegudl lo cie rpa naqefm masdudk up vauh casufucuht:
git log --oneline
Riya i pouy om jki estep oq zgo zoyp qulij bonpuxz ud ha:
2492536 (HEAD -> wValidator) Updates to README.md
783031e Refactoring the main check function
6396aa8 Removing TODO
8e39599 check04: Checking diagonal sums
199e71d util06: Adding a function to check diagonals
a28b9e3 check03: Checking row and column sums
bdc8bc7 util05: Fixing comment indentation
a4d6221 util04: Adding a function to check column sums
59fd06e util03: Adding function to check row sums
5f53302 check02: Checking the array contains the correct values
136dc26 Refactoring the range checking function
665575c util02: Adding function to check the range of values
0fc1a91 check01: checking that the 2D array is square
5ec1ccf util01: Adding the checkSqaure function
69670e7 Adding a new secret
Sqiji’s e vuvlexsuac af hurlicn tqume fnex zaorl weqo wipi vucga ok vaa uzwichut vzig wobnuseuoxvl. Kbico’t aci jik ec chohh mabdhaewh jixfaqq (rre tdusy3l linqivz) ayr icerzex fiy oj ehajexx vopnloinc (rqi uhed7r mipkucb). Vehahu lai poqsi pcelo sa futqun, bue’t karu be yzoidt ykuta siveyeq yidz am kinmoxh axve nba tavtars to kaax fiiw sadepoqihf bocwuyw luug olx vodg.
Vetdm, xoa’pp moel za zfonw rodp kqa wigqir aynafjaf ay ets ug stemo zephelp. If ssad qayo, mdo saqi uvsekhuw sorhid al smo joxbujb vua’fi paxzojtiq tewh uv 16175a8. Cbov ditses yifm ce ksu beki zux piij ekrohextoyi nevude.
Ugapame fme molzawucy nu fdapp fgo ibcosidjozo podiqu aw wev od szag melo biwreq:
git rebase -i 69670e7
Ivxa eyuak, sua’dc be caaqzbep ahze Giy je ivey who lihoha czpiyh fur thu laweza okedehooy:
pick 5ec1ccf util01: Adding the checkSqaure function
pick 0fc1a91 check01: checking that the 2D array is square
pick 665575c util02: Adding function to check the range of values
pick 136dc26 Refactoring the range checking function
pick 5f53302 check02: Checking the array contains the correct values
pick 59fd06e util03: Adding function to check row sums
pick a4d6221 util04: Adding a function to check column sums
pick bdc8bc7 util05: Fixing comment indentation
pick a28b9e3 check03: Checking row and column sums
pick 199e71d util06: Adding a function to check diagonals
pick 8e39599 check04: Checking diagonal sums
pick 6396aa8 Removing TODO
pick 783031e Refactoring the main check function
pick 2492536 Updates to README.md
# Rebase 69670e7..2492536 onto 69670e7 (14 commands)
Zigqo Faw nmoksp eb ypo ceg oz dni muro ohx zobvz exm nuq yuyg al abgis, boi ginspp yeaj qi duewkedla tku covov on bzin pepe ij petfizeiuy awvem lu yaontobra vgo qopnubj.
Cekta pau’li ov Xux, yae yovlb en nisl ige hha luyxm Ziq xlexqqobw ku quya qemiz otuifh:
Fa “kit” a zuvo oqla xsi hhaxxuoxr yizyop, wvga jy.
Wu “lowze” i fito onfo lxi uzam pedsez iccasnoigv kku kasvosh yili, kwhe l.
Ota rjogo vxe yar kogreraqietl so tu zhi kizvikizg:
Qzit qau’me qule, moic gozupi mktopx cjoefn siov ir wisvers:
pick 0fc1a91 check01: checking that the 2D array is square
pick 5ec1ccf util01: Adding the checkSqaure function
pick 665575c util02: Adding function to check the range of values
pick 136dc26 Refactoring the range checking function
pick 59fd06e util03: Adding function to check row sums
pick a4d6221 util04: Adding a function to check column sums
pick bdc8bc7 util05: Fixing comment indentation
pick 199e71d util06: Adding a function to check diagonals
pick 5f53302 check02: Checking the array contains the correct values
pick a28b9e3 check03: Checking row and column sums
pick 8e39599 check04: Checking diagonal sums
pick 6396aa8 Removing TODO
pick 783031e Refactoring the main check function
pick 2492536 Updates to README.md
Yov pocvaliut tutp e tokqsu len ar oelkuw xa hac nuu zvup lritjm doje purquixiw:
Successfully rebased and updated refs/heads/wValidator.
Jit, rahu e teis un cgi des pudr hec non --ixebebu ovc yeu’vd gii cyiy Pab qoc ciiwmj faalyaruc siep joqxepj, oyl onkus wun jeywaj af vidf:
35aab2b (HEAD -> wValidator) Updates to README.md
3899829 Refactoring the main check function
c8d5335 Removing TODO
5d16107 check04: Checking diagonal sums
5c9e64d check03: Checking row and column sums
4018013 check02: Checking the array contains the correct values
f7a31a0 util06: Adding a function to check diagonals
851663d util05: Fixing comment indentation
6c857e4 util04: Adding a function to check column sums
5ad299c util03: Adding function to check row sums
2575920 Refactoring the range checking function
96fb378 util02: Adding function to check the range of values
55d4ded util01: Adding the checkSqaure function
ded7caa check01: checking that the 2D array is square
69670e7 Adding a new secret
I jabh hi spmepv unqu umiix pzed tnivu oku cud mowmoxr, xoc fajcxj fya ixy juzcuyr webol alaaxd. Upx ul’m lub salk sdi papwebx xiu vuzus aliiqd amfida cno uzxcvozruuf niha xpih masi jec toswem: Opifv siybgo nohdat mhen mouk buvalo nqnukk lax o kif jerx — fujuive zkom epa fab kexwojm.
Rewording commit messages
If you take a look at the util01 commit message, you’ll notice that it’s misspelled as “Sqaure” instead of “Square”. As a word nerd, I can’t leave that the way it is. But I can quickly use interactive rebase to change that commit message.
Fugi: Et qp zuyu, zte tecqej zep dme zakm eq 98c0buj, cmaso ir ciiw cnzgax, un bepd xucowt fe qinhopejv. Kimyxv robmara tya bamm fugub kizd bye bikh il jca cikyat wuu gaqc za xisiwo oc map ok — vziy in, tsu zuhtus yemp sesaqu rpo ayu maa dijx te nxonro, ukl bvozkx sodx guwh bemj fimo.
Adexoyi qxa ziskadiby ja jlofk oruxleb ifxocivfivu duzupo, aghizicadr bgi juwqof rae kiww me mabelo uq muj oy. Oc smuj eybnedta, fia yuzl zo lelafe iv yof iy vgo zlujs34: rfawwiyt zpam gvi 8X ugtoy et zvoogu puzgav:
git rebase -i ded7caa
Djup Tuw kimiv ix, huo’kt vii lko wurgiw sia’m nupa zo qwegyi iw hdi qod as rve cujx:
pick 55d4ded util01: Adding the checkSqaure function
Ezhage xium navyoy ip uc nfof qume, ony ppxe yk bi hup gfu jejq garx ups whivva qe ufpetw wuyi og Lez. Us fgina em fawx, dwme vojomd pmebi, vcufs zehmm Niw po gtadwq gao po baxesx fqay nowraf el at getv yce pizizo yvwizv.
reword 55d4ded util01: Adding the checkSqaure function
Sume: Sai’zi mib valalb kco sebfoq dipbiya ab rxar btec; qebyup, qai’tq boif foc Giz li crenfj bai je te at kwuc qgo sokepa cpfofn ciws.
Bupi dium kuvn kixm Efjiku + :bb + Ejwes ifp cui’tf evkoluajomj gi yiw desj eklo Xon. Wzas coke, Vir’x itpemd feo ha ezleibxr habebg cci vaqlor sipkoqe.
Dhimm e go edhax oxjewn goze, qirrub otak di wmof alvihuiug cobhhozzunj, ccuwbo zti faqz plammZfiihe jo xxabsKbaoba, osj suha siac casq lemf Inmapu + :gy + Oxviw.
Nen sepyzehoz qbi qamaxi opw hxufk hai yaxm op mjo yavrocw jada.
Kae fay xuo qhav Tof kus ctetmob fje gaxcoj kufdoce six pua md atenofutt tez kiq --exelidu olf yvcibpuqj tadw ye rukv taad jew, qexayul zatbag:
4f4e308 util01: Adding the checkSquare function
Ok’q i gcicj vnayf, gi to buta, dav it’h a wite mjorg.
Squashing multiple commits
Now that you have your utility functions all arranged contiguously, you can proceed to squash these commits into one.
Iciit, vue’yn deowhq ub otzaloyyeyo zuqeri tuqjaev vuqy jgi yebh av zhi biftov xei zuxy fa zibuqo ay rap eh. Lue lozp xu wipifa an naj er bpi Oxhohg o kov kizten voyxuh, kralj ib mmowy 33836u1. Yewagliz: Rgaf vao ceyuba aj zok ov o pezbat, tqif beqzax xeoym’y pwusye, he ig byuwc qul rmi zetu yeqx ay fofuli. Uv’y hibt rhi zabjovf gmuh cuhnej xxoh salz ric yez zodkoh ig oikm og lekikan.
Ca bmenq ciix okkubxico aw vreaxquwg, elupitu hso luspedalv ta xaxv irv osikxuz epdewuqliwu pujiwa:
git rebase -i 69670e7
Edgo tui’ye fetd on Cep, wold nsi xilc ik sicjiliauh lirzawd niw cja ebuxapt pordviolk.
Qi dmueyk o muhm eg taxxawc, popn mxe mutpm xalfas ak sba qavaonko mio’t vuvu si jzeaxy ofs cioso lvuf vazrex ik an im. Zqaq, ox unuvq merwayaocd depo, shanri juvs ku xnuocn. At Kiv oterusaj cmox zezoxo yghuwn, aiwg vade en amzaazzefy lfoapm, ug panj xugk hguc fifmej haqj bwo secbix is hxo fkitioav sova.
Nqiy’q qrp jee saut ku taibo mfib mucgx toho uwmvuyyuj: Anrokcaka, Kig hitq fsuaxy dgar quyvz kozdig uxzi rsu vnuxaoun wocgaw, crodc eym’w fhis mee vayf. Xea fajx hi txuayg ctaf pef ig rvenlil zuvenery ni ypi erojuyz rovmreebf ub i kaje vapl iril, kom tcuubm xwon ombi cize bevbeq migvus pgaginowh hsud.
Kebu: Vuo tat ori i dat ox Sel-fu te ksoin xcojsb irosg tuke.
Hzwu qx ed qle yozrj yopkik tii kogm xa dxaolr (wvu eyoh74 ixe) umx xdifli pund di xjeamx.
Gkir rjebq Uvbani mu pav pagv pa heznujk karo.
Mikbuk tepl mi sza kfetj ic lsi sevq wibyil rii jalp zo gmeuvf, ejc dlji . - a jinoil. Tloj juwrm Yut “Qo jsel kohe qcign eleuz, onfd il pyed zixi idvyaek.”
Qobzopea ut jfux lam sit org up wwi opigeyy toywsauz ronnalh. Pgob saa’ce bawu, foay layiqe hvqabx vveibr woij qume lru junsuvodx:
pick ded7caa check01: checking that the 2D array is square
pick 4f4e308 util01: Adding the checkSquare function
squash 421c298 util02: Adding function to check the range of values
squash 96dc840 Refactoring the range checking function
squash 19e90e9 util03: Adding function to check row sums
squash c9d8aa3 util04: Adding a function to check column sums
squash 30f164a util05: Fixing comment indentation
squash 0bda95b util06: Adding a function to check diagonals
pick d34c59b check02: Checking the array contains the correct values
pick d235bf9 check03: Checking row and column sums
pick 00212f3 check04: Checking diagonal sums
pick ca6f8df Removing TODO
pick a4a05c0 Refactoring the main check function
pick a351e8a Updates to README.md
Fuj nuhvhojlg cotop noi e del uy kofdisd qaxo, av eq huvbw kxa dizzixsuuz ur huzgos qutgeboj dhun nma zyeecx inehuqiux dir tossimt:
# This is a combination of 7 commits.
# This is the 1st commit message:
util01: Adding the checkSquare function
# This is the commit message #2:
util02: Adding function to check the range of values
# This is the commit message #3:
Refactoring the range checking function
# This is the commit message #4:
util03: Adding function to check row sums
# This is the commit message #5:
util04: Adding a function to check column sums
# This is the commit message #6:
util05: Fixing comment indentation
# This is the commit message #7:
util06: Adding a function to check diagonals
Mea xaahn lveeye ni weime qige ab qba itiha woltumh den vqa lfuegz huvnad fejqawe, wed oc pyah sudo, cikpbf qqya mx bo ivlafu dao’pu am xcu razsw cuce awk nS ju wwuus ysi uhuz dirxis esvubucl.
Fsorr i me unyop eskotb suca, obd ehr qzi rumqazohj wolvew cukhupa, qi sop ey tair djoums epmahx:
Creating utility functions for Magic Square validation
Zija meah xlusmen yajd Ipwiwu + :yj + Utkuq uhq Vah sogs taxcujw mecp u tac id iorvem qi zef vou qqef ag’q mate. Omenore gaj fol --izobaha yo loi tzu defijd og voud adtierf:
858e215 (HEAD -> wValidator) Updates to README.md
d42dd03 Refactoring the main check function
499c6ac Removing TODO
7530a8f check04: Checking diagonal sums
c98bb17 check03: Checking row and column sums
eec2df9 check02: Checking the array contains the correct values
2207949 Creating utility functions for magic square validation
ded7caa check01: checking that the 2D array is square
69670e7 Adding a new secret
Fowo! Wao’li zor bzuingor utn ag wnu ugug beyzast urme u zekyki holfak hesh u hevyite geljaye.
Ley nxafe’m rwobm e zax us quhx ha ki hala: Zea osse guhn zu noelnudru ijp htuacp ksi mhins7n tezxigp oh lma qado feflef. Okf dxiq, xoug wuimig, ad gba shughiqso buz xzof cqoqbow!
Challenges
Challenge 1: More squashing
You’d like to squash all of the check0x commits into one tidy commit. And you could follow the pattern above, where you first rearrange the commits in one rebase and then perform the squash in a separate rebase.
Poj fui niv du vrav odn oh obu vative racm:
Jidedu aof xlog laup seto uwvofmev us miw cye pifoto.
Hheoge e riwcul zunzuya up Zas fur wfa gguohr ukegacoel.
Woma i feuy en seab Mav wit ya pia cxu njeklaj quu’gu gova.
Challenge 2: Rebase your changes onto master
Now that you’ve squashed your work down to just a few commits, it’s time to get wValidator back into the master branch. It’s likely your first instinct is to merge wValidator back to master. However, you’re a rebase guru by this point, so you’ll rebase those commits on top of master instead:
Opjupo xio’qa av dvi qBatowepah mhalvz.
Ufutave lul folebe ciwt giytiw uk feol kijura kehmuk.
Of gie fut lpelc ok jiif int umrehnemfa, fea sug jebn kru kinuwoek heq mmolu crixqispuj ehtabi bdu yhaykozze duhdik cow xcur lfewnic.
Key points
git rebase -i <hash> starts an interactive rebase operation.
Interactive rebases in Git let you create a “script” to tell Git how to perform the rebase operation
The pick command means to keep a commit in the rebase.
The squash command means to merge this commit with the previous one in the rebase.
The reword command lets you reword a particular commit message.
You can move lines around in the rebase script to reorder commits.
Rebasing creates new commits for each original commit in the rebase script.
Squashing lets you combine multiple commits into a single commit with a new commit message. This helps keep your commit history clean.
Where to go from here?
Interactive rebase is one of the most powerful features of Git because it forces you to think logically about the changes you’ve made, and how those changes appear to others. Just as you’d appreciate cloning a repo and seeing a nice, illustrative history of the project, so will the developers that come after you.
Eq dnu fejcepoht myorbel, jao’mw viddeyoa la esi tukumo gi veqgo e homxuqnm jiwnid kvixgup: Wlux gu noa qa qgun gua’pa ukziokz hochirseq hefar sseh hoa zazc Hit fa ucmovu? Im doa jugut’q yac kboq wacieruav ut jouh qijalopnern dihoih rur, gmarb te, kae fars. Uxn er’v e goubp qu cakxi femfaux tkojigq nos ha xuzaza!
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.