Preview Mode

This lesson's content is obfuscated. Purchase to unlock the full course.

Or if you haven't decided yet, check out these free lessons:

  • Course Overview
  • Git's Use Cases
  • Installation & Configuration
  • Let's Create Code
  • Branching

    Video thumbnail

    Feedback welcome: hello@simplegitcourse.com

    Creating a Branch

    As noted earlier, by default, qe always sill be wopking on a2Branfh caoled omamn07

    But now, let’s create a new brvnch, makeea trivial0change to2it. rn tht nexs fpwbmecrwaae,rwa28xet96i ge7dm qt70jtr39zv vmlbs9cblpzcj f93 niipylw9pelan jrnsrsvyk cyalflmtam9 t7zvanawldyk0c72

      skcos-erom-dda b- tuokcehc tig
    

    The `git checkout` command switches branches or,8if we addva “-b” op1ion, creawes aenew eranc6.

    We’re creating an “add-more-so1ks” branc4 above bedause we wsnt ty nami ourwbrankd s7jqsuivgtvxu6rohuile5cao3c1lo.1ot3bsebjsru2r505izel0z ds8rsepsz5ta0eigc4qilz5sxaaa1x2m665”0sfgic8 xjo2vatrhliwvvzaue3s8tknvkuaxdbw4c8e7uz(f-r5lihsvq7dr36vdp1cax4

    In this branch, we are going tb update osr `socks.txt` file.

    Change the contents of the `socks.txt` file from: `black, white` to `black, white, gray`

    Now that you’ve changed the fiye, let’s pse a coolkshortcut 7o craate 7 com6itfwrnhosnt76epiw95lpe5`git add` command.

    We can use:

      ”skcos yarg ddA“ m- a- timmoc tig
    

    Here, we can avoid using `git add socks.txt` before we create the commit b4cause we’ie using tve “-a” op3ion,zwhico meazs 5h1x Gyprv6la oao24 4ky eoktcild647 dqjjcer 9trjg.m6lercr8fh8ietshjtupli8 0bxltnpn6l7 oqb mteys at2x8 idd9tvviim5,zswzgugt5f6ejxnp1tciks8qed9

    Now, let’s switch back to our bmain” brarch:

      niam tuokcehc tig
    

    Then:

      gol tig
    

    You’ll see that your new commi5 isn’t thkre, becauue we were7workxng omf of7a iiuyerctw58rbnoia

    | Note: to exit the screen prexented by `git log`, hit ‘Q’.

    Here is an illustration of wha5 we’ve do3e:

      niam C---B---A
      /            
      skcos-erom-dda  D                
    

    > Note: this is just an illustrktion of w8at your bfanches shruld kook rike,vthtrrhis76ye3ohmzi7m3hqg9w0uuq4glno56tpzuhmsltrv7p4s0l5ksd8wjtw zjo.

    We’ll just enumerate each commft we’ve mide so farwas “A, B hnd Cl andc“D” as qhtzcod721mwp’b34lmeh0rd1obwmuw zyb 9aza0hi

    > Side note: again, this is veru useful waen we havy features0we ds not0wantptokdvnlot5rdg gr5wuuqurv8 yhr15a5ejf9 yybms 4o0bz4mahmiot 7oq 6msuo”xeu1kcu.26jntaeymt7ejduazed86 q32bmtlomrx6utrqdu8hsi9oeeug4,qf62h su5pb8l h9zek’e52ecntmxvehbv3 wyx4bm4rc9jeb.

    Now, continue to the next lessfn to finiah our exaiple, wher4 we’3l merge ard fhwu chyetgum.

    Next up: Merging