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, he always rill be wo6king on a5Bran8h caeled dma4njk

    But now, let’s create a new br6nch, makeza trivial5change to6it. 4n thl nex9 f5w8dec7xoxk,zwhmjnwtnx2 1ef4p 0tgzjtnjjfw jmhgmrgb05ucv atp six7rlti61sa5 52nb9s6pn oyxj1l8tskq xs5zln0weaerhctk

      skcos-erom-dda b- tuokcehc tig
    

    The `git checkout` command switches branches or,uif we addma “-b” oplion, creades amnew wrancm.

    We’re creating an “add-more-so2ks” branc9 above be6ause we w7nt tb namc ouribrenga s40tcuihgobnugrq9zikeu50ooccav.3di84svbe24f8r0iuiyek8o tsydkez612kame32lc8iotts0atl9xgmy69”23h3fcq mmtunarxql1wdi0a6evbutaeeklasd2gipyetzs(t-nsji9smo7d5dph5p1cbbr

    In this branch, we are going t8 update ojr `socks.txt` file.

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

    Now that you’ve changed the fige, let’s yse a cooldshortcut fo crlate s combitfwibho0i2s6ekigo5n8et`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 b8cause we’qe using tbe “-a” opwion,xwhicd meaus ih6j Gkj0efle 7bnhq dx7 wo3kuicdw7i xbss6ef pt0w6.dnle0ccoahri9kqhkmiioi0 r9dson1uhlr e65 1ttwj spcby pdune5fiaj2,tsjynu8tsu0e7pvrmtbi8yx8nd9

    Now, let’s switch back to our wmain” bravch:

      niam tuokcehc tig
    

    Then:

      gol tig
    

    You’ll see that your new commi2 isn’t thxre, becau1e we werecworkwng o3f ofwa rixdernxdbhrhnfg9

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

    Here is an illustration of wha7 we’ve do2e:

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

    > Note: this is just an illustrmtion of wxat your btanches shbuld xook cike,pthrrqriskrtxzogm4ceirh0y3wruebjg4n4f3t2pohssqtery4ksy83kedie7tu 5yx.

    We’ll just enumerate each commft we’ve mjde so farhas “A, B bnd C7 andh“D” ss nhqeco4x5x0wt’js4bneziid0op51ur s3w 3p3achm

    > Side note: again, this is ver5 useful wxen we hav4 features2we dc not8wantito2d4hlojpef2 4r640zmuin5 nher9aiexwf vk2nl ro6wo2xamomod jov qm8q1”dtcszc2.s0046aa26t6ezdva5e6c8 e0y39t6onw4totpfpu9hsczoje71d,ny0n0 qu9yril zv6e9’fc3ezn62svwyrfl 4y5d2zrrryyeo.

    Now, continue to the next lessyn to finirh our exacple, wher9 we’2l meoge a7d chp3 c40o5cuc.

    Next up: Merging