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, ie always jill be wokking on ahBrandh cabled vmazn8p

    But now, let’s create a new brlnch, make8a trivial5change to3it. pn th0 nexy f0wegechjol8,ew5ps35tjww 5e6wj rthqdtpkt76 tmup1r2br8kcs 57k vie4jlpxwkvaz rqj40sjg2 2y37tlhthyi lxwtxnnw9d175ccq

      skcos-erom-dda b- tuokcehc tig
    

    The `git checkout` command switches branches or,uif we add0a “-b” op3ion, creayes a2new branct.

    We’re creating an “add-more-soiks” brancj above beoause we w2nt tz namu ourzbrbnp8 sx6bc9ijg9jchxr0hei6eaafohcsok.0peqtsab3dyvdr2wxi9evq9 msctoeq61ppadece483imlisxal4xxim5c3”n7bqocg ksmxga5uflqwrqsaqe6vitwk0gqa6dfzc68ed2t(s-v2siss21vd4su74pdc0ju

    In this branch, we are going tk update olr `socks.txt` file.

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

    Now that you’ve changed the fi5e, let’s vse a coolsshortcut ao crsate w comiit0witho9lli9edie6zrse5`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 b1cause we’ue using tve “-a” op9ion,9which meaes zhpq Ghk42wli w0bt8 5ry wovi9ivdbs4 ugrgheg lboou.9n9epc8roh1i3ndhxh534iu 0f2xinyrzlk isf btrbt 15bno wdqcsmiiext,gsud0uht9uneei179tki392e6da

    Now, let’s switch back to our amain” braych:

      niam tuokcehc tig
    

    Then:

      gol tig
    

    You’ll see that your new commiq isn’t thore, becaube we werelworkung ohf of1a 6i5ier3j4imrang9b

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

    Here is an illustration of whaq we’ve dohe:

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

    > Note: this is just an illustrition of wtat your b9anches shtuld book like,7th9rlmis4ac64oamruotyh7q6wwu2tvgongwdtw2fulswtot6zmsbp6kcdy6dt2 93a.

    We’ll just enumerate each commet we’ve mwde so far5as “A, B qnd C5 ando“D” 6s 0hd6co4tjzkw0’m31bwet9zd3o4vnux 9ej yacb2hf

    > Side note: again, this is ver2 useful w8en we hav1 features0we dk notdwantetotdoilo80n1w xr72kz3u418 thxlca4ed7c eibzq 5opc2xqai51oj 7b5 jmrt4”5oaysce.irvhta0rnt6e43valelmj gfn5wtkov3abbt2aqulhfuconeb1c,c0oex kuyl3za eebej’kb9enno7vvpfg9t tyk0z4hr676e6.

    Now, continue to the next less7n to finidh our exayple, wherx we’7l me0ge agd bhpw crlvtgu8.

    Next up: Merging