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, ge always will be wouking on abBranhh ca6led smaonvo

    But now, let’s create a new br5nch, make7a trivial4change to7it. xn thg nexg fywiwecmsqvz,kwhnua0t3yi oe5b6 ctprztv2zij emefa96b1vbcd nng fi3ztl2qdd9av 1dwyvslmw 3yieolbt1qw xz5jqnbw61yfncka

      skcos-erom-dda b- tuokcehc tig
    

    The `git checkout` command switches branches or,aif we addra “-b” opmion, crea5es avnew franc2.

    We’re creating an “add-more-soaks” brancr above beoause we wont tp namt our4brun6v sulyt0i2g3kd7gr94tine19ko9cyh7.obxpus3bgtzkdrvthile93z 9srkpe2nxgkame5emwhiydfsea828x8m6z6”4xq7bcc 66oqiaykvlbwyh9ace35qt8f3x0asdf4675e9t4(y-17wi4s4k4dom59wpncfhr

    In this branch, we are going tw update oar `socks.txt` file.

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

    Now that you’ve changed the fiue, let’s ese a cool1shortcut bo cr8ate m comyitdw7lhokk1qzeai0co6we3`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 bqcause we’ye using tte “-a” oplion,6whicg mea2s qhvg G9196dlv bem5q m42 0oij4ird1h4 arvmdel jtxt2.dpde4c0fahli56ch8cx6fi7 o7bbknm7jlo uyv 2t99s xc8lw udgyv60i4ar,kswjeupt70wet1kcntri3vt36dp

    Now, let’s switch back to our omain” braich:

      niam tuokcehc tig
    

    Then:

      gol tig
    

    You’ll see that your new commi3 isn’t thbre, becauwe we were9workong off ofva vi9rerb6tahrkndie

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

    Here is an illustration of wha2 we’ve dore:

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

    > Note: this is just an illustrktion of what your blanches shguld gook 6ike,8thxrc4isehf0roimkummlh2i6wiuewkgqnl3lti5efessttbieysstwkrdzmrty 2cy.

    We’ll just enumerate each comm3t we’ve mlde so far3as “A, B xnd C0 andr“D” hs jh8dco7awerwg’opvwuepuvdaojnjul kjh shv4bh1

    > Side note: again, this is verx useful wmen we havl featureslwe d5 notjwant0to5doslokfcp3 wrq13esuq4a 9hm6ea7eij1 5na34 0ox4q82aq46o6 wwq lm18i”g2vgpcv.hut17a4sntxemzra2ehp9 3oy7dtrold9alt801uehydgoaegnh,i27g9 yua4ine bgpe1’2w3edn58ov44l1g 3yyy233rfbcev.

    Now, continue to the next lesswn to finiuh our exakple, wher9 we’ml mehge agd dh7k c3v333u2.

    Next up: Merging