The Modern Coder
The Modern Coder
  • 74
  • 2 131 244
Git PULL vs FETCH
.
More lessons like this: learngit.io/
Git collaboration basics (clone, fetch and push): ua-cam.com/video/ByBGTkrQ-QU/v-deo.html
Git rebase explained (merge vs rebase): ua-cam.com/video/zOnwgxiC0OA/v-deo.html
----
In this video tutorial we'll discuss Git fetch and pull, and learn essential use-cases for each. Both pull and fetch are critical collaboration operations uses to sync commits between local and remote repositories. In additional to code samples, this video also covers pros/cons and the three most common Git pull configuration options: --ff-only, --ff and --rebase.
CHAPTERS
0:00 Intro
0:13 The difference between Git Fetch and Pull
1:51 Why use Fetch vs Pull?
3:02 Pull merging strategies
3:28 git pull --rebase
4:04 git pull --ff
4:42 git pull --ff-only
6:05 Review
#git #learngit.io #learngit #mergeconflicts #gitfetch #gitpull #gitmerge #fetchvsmerge #github #gitmerge #gitrebase #stackoverflow #development #softwareengineering #programming #coding #versioncontrol #developer #technology #tutorial #stepbystepguide #gitrepository #vcs #programmingtips #codersofinstagram #codingcommunity #learnprogramming #softwaredevelopment #codingtutorial #gitexplained
Переглядів: 6 700

Відео

Git Fundamentals: Staging area, repository, working directory, file states, and commits tutorial.
Переглядів 3,3 тис.2 місяці тому
Unlock the rest of the videos in this series, and learn more about LearnGit.io: learngit.io/#start-free In this Git tutorial we review the most important foundational knowledge needed to understand Git. You'll learn: the 3 Git sections (working directory, staging area and repository), file states (tracked, untracked, staged and committed), and commits. Understanding these fundamentals will ensu...
What's better than a password? No password.
Переглядів 3,1 тис.3 місяці тому
The better way to learn Git: learngit.io/ Newsletter readers get my videos early: newsletter.themoderncoder.com/ Challenge response authentication: www.arkoselabs.com/explained/challenge-response-authentication/ In this video we deep dive the mechanics of SSH authentication, and learn how to generate SSH key pairs on Windows, Mac and Linux machines using ssh-keygen. GIT HOSTING SERVICE SSH GUID...
Unlock Git collaboration with CLONE, PUSH & FETCH
Переглядів 3,4 тис.4 місяці тому
The better way to learn Git: learngit.io/ Git branching video: ua-cam.com/video/u-6ryWqAJR4/v-deo.html Newsletter readers get my videos early: newsletter.themoderncoder.com/ Reach out! jack@themoderncoder.com In this video tutorial we deep dive into Git's remote tracking branches in order to gain a deeper understanding of clone, fetch, push and pull. The key to Git collaboration and syncing is ...
Git's most perplexing paradigm
Переглядів 3,5 тис.4 місяці тому
The better way to learn Git: learngit.io/ More free Git videos on my channel: www.youtube.com/@themoderncoder Newsletter readers get new videos early: newsletter.themoderncoder.com/ DESCRIPTION In this video we'll learn how Git utilizes pointers to make creating, deleting & updating branches easy and fast. We'll discuss Git's branching architecture, and uncover just what exactly the saying "bra...
The common misconception about GitHub
Переглядів 2,1 тис.5 місяців тому
The better way to learn Git: learngit.io/ Newsletter readers get new videos early: newsletter.themoderncoder.com/ DESCRIPTION Git vs GitHub, what's the difference? In this video we deconstruct the difference between Git and GitHub. Git is an example of a decentralized version control system (DVCS), and GitHub takes advantage of this architecture to host Git repositories. Not only do we explore ...
Resolve Git MERGE CONFLICTS: The Definitive Guide
Переглядів 29 тис.7 місяців тому
👨‍💻 The better way to learn Git: learngit.io/ This is the definitive tutorial on how to resolve merge conflicts in Git. We'll cover why merge conflicts happen, and learn how to fix the two most common types of conflicts. This video covers resolving conflicts using command line Git (and a terminal text editor like VIM) as well as an IDE like VS Code. At the end of this video, I also share a chea...
5 (questionably useful) Git tips
Переглядів 1,5 тис.8 місяців тому
👨‍💻 JOIN THE LEARNGIT.IO NEWSLETTER: waitlist.learngit.io/ Yes, this video is a little bit different than my normal format, but we're still talking Git! Take a ride with me on my EUC through the streets of NYC as we uncover 5 (questionably) useful Git operations. Along the way stopping at some of my favorite destinations in Brooklyn and Manhattan. Aside from interesting open-source Git utilitie...
Git MERGE vs REBASE: The Definitive Guide
Переглядів 85 тис.9 місяців тому
Git MERGE vs REBASE: The Definitive Guide
Git REBASE Explained: Unveiling Rebase's Hidden Hazard
Переглядів 7 тис.10 місяців тому
Git REBASE Explained: Unveiling Rebase's Hidden Hazard
I’m making a big bet…
Переглядів 98111 місяців тому
I’m making a big bet…
My toughest project yet
Переглядів 1,1 тис.Рік тому
My toughest project yet
Delete Git Commits Tutorial
Переглядів 38 тис.Рік тому
Delete Git Commits Tutorial
Change Git Commit Messages Tutorial
Переглядів 15 тис.Рік тому
Change Git Commit Messages Tutorial
Coding ability is overrated
Переглядів 1,5 тис.Рік тому
Coding ability is overrated
Git Amend Tutorial: Rewrite Git History
Переглядів 10 тис.Рік тому
Git Amend Tutorial: Rewrite Git History
Git STASH Tutorial
Переглядів 22 тис.Рік тому
Git STASH Tutorial
Resolve Git Stash Merge Conflicts
Переглядів 10 тис.Рік тому
Resolve Git Stash Merge Conflicts
Git CHERRY PICK Tutorial
Переглядів 92 тис.Рік тому
Git CHERRY PICK Tutorial
Resolve Git Cherry Pick Merge Conflicts
Переглядів 35 тис.Рік тому
Resolve Git Cherry Pick Merge Conflicts
Basic TMUX tutorial & cheatsheet
Переглядів 4,6 тис.Рік тому
Basic TMUX tutorial & cheatsheet
Your open-source Notion alternative
Переглядів 6 тис.Рік тому
Your open-source Notion alternative
My 4 linux terminal programming essentials, with one caveat
Переглядів 1,7 тис.Рік тому
My 4 linux terminal programming essentials, with one caveat
Brooklyn's smallest programming desk is packed with hidden features
Переглядів 1,1 тис.Рік тому
Brooklyn's smallest programming desk is packed with hidden features
The Modern Coder 2.0 // what happened & what's next
Переглядів 1,2 тис.Рік тому
The Modern Coder 2.0 // what happened & what's next
Can a $30 vintage Olympus lens outperform a modern kit lens? // Olympus OM G.Zuiko Auto-W
Переглядів 16 тис.4 роки тому
Can a $30 vintage Olympus lens outperform a modern kit lens? // Olympus OM G.Zuiko Auto-W
Pros and cons of living in a tiny East Village NYC apartment
Переглядів 14 тис.4 роки тому
Pros and cons of living in a tiny East Village NYC apartment
macOS vs Windows for Programming
Переглядів 43 тис.5 років тому
macOS vs Windows for Programming
Weather ruined our spring expedition to The Enchantments
Переглядів 4415 років тому
Weather ruined our spring expedition to The Enchantments
My NYC coding setup
Переглядів 120 тис.5 років тому
My NYC coding setup

КОМЕНТАРІ

  • @tirthankar9533
    @tirthankar9533 6 днів тому

    thanks for the video!

  • @savysavy-mv2qd
    @savysavy-mv2qd 7 днів тому

    Thanks bro you just saved me

  • @deveshgarg
    @deveshgarg 8 днів тому

    At 5:06, I didn't get the idea why we checked out to feature branch for rebase to work. Aren't we actually doing it as following: "Change the base of your feature branch to the latest commit (head) of the master branch"..? I'm a bit confused here, pls help.

    • @themoderncoder
      @themoderncoder 7 днів тому

      Rebase can only operate on the checked out branch (this is a weird nuance of the Git architecture). Technically, you could run “git rebase master feature” without checking out the feature branch first and this would complete the rebase in the same way you see in the video at 5:06; however, “git rebase master feature” is just shorthand for “git checkout feature” followed by “git rebase master” so either way you’re checking out the feature branch

  • @mehdizahedi2810
    @mehdizahedi2810 8 днів тому

    Your videos are an absolute gem. Thank you

  • @christiansmyth1466
    @christiansmyth1466 8 днів тому

    Linus Torvalds and Ada Lovelace. You have friends in high places 🙂

    • @themoderncoder
      @themoderncoder 6 днів тому

      true! My wife does kinda look like Ada Lovelace with the short hair lol

  • @christiansmyth1466
    @christiansmyth1466 8 днів тому

    3:09 You lost the instagram_username line from the bugfix commit LOL.

  • @devtommie114
    @devtommie114 9 днів тому

    Beast video! Thanks.. I just got my new mac today and this video helped alot!

    • @themoderncoder
      @themoderncoder 9 днів тому

      True - new laptop day is so sweet. Going from the basic terminal to one you’ve spec’d out is such a night and day difference.

    • @Tmartinez114
      @Tmartinez114 9 днів тому

      Yeah I guess on my windows the gitbash did it automatically so this helped a ton

  • @carlosmillanmazzucco1766
    @carlosmillanmazzucco1766 9 днів тому

    dude! so envy about the city, nice content tanks a lot for sharing

  • @fernandolordao2
    @fernandolordao2 9 днів тому

    Great class! Thank you!🙏🏼

  • @daedracrab1210
    @daedracrab1210 10 днів тому

    this is so helpful, thanks man

  • @abdelazizez-zahed5009
    @abdelazizez-zahed5009 11 днів тому

    gooog

  • @lemonteateacup
    @lemonteateacup 11 днів тому

    6 years later and this is still an amazing video! Super clear and intuitive, thank you!

  • @MrVipulLal
    @MrVipulLal 11 днів тому

    Nice format. Thanks

  • @TheKaosTux
    @TheKaosTux 11 днів тому

    git config --global rerere.enabled true git config --global pull.rebase true That’s the way

  • @irvanhardyanto7038
    @irvanhardyanto7038 12 днів тому

    Nice explanation, thankyou

  • @thibautizard
    @thibautizard 12 днів тому

    Crystal clear ! I'm glad I've found your channel and eager to discover more

    • @themoderncoder
      @themoderncoder 12 днів тому

      Definitely check out my other videos - there is a ton more there!

  • @Matt-pd2cq
    @Matt-pd2cq 13 днів тому

    Excellent explanation and a nice, clean video. Well done. Subbed

  • @dayasagarpatil
    @dayasagarpatil 13 днів тому

    Excellent videos, have been using git but I had lot of confusion about many basic concepts, luck i came across your videos with very crisp explanation with awesome graphical representation which makes it very easy to understand. Keep up the good work, looking forward for more informative videos..

    • @themoderncoder
      @themoderncoder 12 днів тому

      Appreciate you saying that! If you're looking for something new, my video on fetching/pulling (ua-cam.com/video/T13gDBXarj0/v-deo.html) is essentially a follow up to this one.

  • @vasudevans948
    @vasudevans948 13 днів тому

    SUPERB... Video. Crisp and upto the point. Nugget sized videos - addressing specific topics THANK YOU SO MUCH This video saved me a lot of reading and researching time

    • @themoderncoder
      @themoderncoder 13 днів тому

      Awesome, thanks for taking the time to leave a comment. These videos (and especially my new ones) take an insane amount of time/effort to produce, so it's nice to know they're helping!

  • @darkphoenix68
    @darkphoenix68 14 днів тому

    I came to Git from SVN -- and the ability to modify history was probably the hardest thing to wrap my head around. Not only that it was possible, but that there were situations where it is actually desirable! Now ... well, I could not go back to SVN! 🙂

  • @nageshvagicharla
    @nageshvagicharla 14 днів тому

    Thank you, till now I faced difficulty about cherry picking, but after watching this video it made completely sense. Thanks again.

  • @luiscarlosjayk
    @luiscarlosjayk 14 днів тому

    How do you make such beautiful animated presentations?

    • @themoderncoder
      @themoderncoder 14 днів тому

      I use a combination of Apple Motion and keyframe animation in Final Cut Pro!

    • @luiscarlosjayk
      @luiscarlosjayk 14 днів тому

      @@themoderncoder The final result is awesome, because you don't leave explanation to be abstracted in people's mind but give a visual representation of what actually happens, so it's easier to understand. Great content!

  • @agenticmark
    @agenticmark 14 днів тому

    Hoping I see you point out rebase leaves a clean tree, merge creates new commits.

    • @agenticmark
      @agenticmark 14 днів тому

      Yep you nailed it. Great video man!

  • @kevanbarter
    @kevanbarter 15 днів тому

    I always merge latest from main/dev branch into my feature branches, so my feature branches always up to date. Then PR into main/dev branch when I’m done with a feature

  • @vacances-en-famille
    @vacances-en-famille 15 днів тому

    Nice edit and animation

  • @TheRocreex
    @TheRocreex 16 днів тому

    To clarify a common misconception: A "tree" in the context of Git does not refer to a commit history (because that is not in fact a tree in the mathematical sense due to merges, actually it's a DAG) but it refers to a snapshot of the repo, i.e. the content of a commit and therefore a filesystem tree. That might be important to know so not to get confused when reading the Git docs and learning about the Git working tree.

  • @user-oj9iz4vb4q
    @user-oj9iz4vb4q 16 днів тому

    It's simple, never fucking rebase. The very concept of rebasing is fundamentally flawed and only used by damaged OCD people.

  • @mxsniper223
    @mxsniper223 16 днів тому

    شكرا جزيلا .. thanks' a lot man

  • @DavidPashley
    @DavidPashley 17 днів тому

    I think you may have an incorrect mental model of vim. The escape is not part of the quit command. The default mode in vim is the command mode. i puts you into insert mode and escape leaves insert mode and returns you to command mode. Colon moves you to another mode: ex mode where you can type ex commands. The ex command you're using in this situation is wq. If you're using escape before quitting even when in command mode, then it suggests you're not thinking of insert mode as something you dip in and out of before returning to the steady state of command mode and possibly missing out on the incredible power of command mode.

    • @themoderncoder
      @themoderncoder 16 днів тому

      Your comment is a nice, succinct explanation of what I glossed over in the video. It seemed more approachable to gloss over vim modes to make sure folks could save & close a file without knowing which mode they were in. I'll admit my vim knowledge beyond simple commands is limited, I remember first starting out watching senior devs fly through code in vim, and being very jealous. Hopefully one of these days I'll find the time to up my skills!

    • @DavidPashley
      @DavidPashley 16 днів тому

      @@themoderncoder Yep, vim is complicated, mostly because it's very different from almost any other editor that just lets you type and go. It's not helped that it's built on top of a very limited editor designed for teletypes (ed and then ex) When I was starting out, I had the same misunderstanding of vi, but someone much smarter than me gently corrected me and I became much more fluent.

  • @UTube2K6
    @UTube2K6 17 днів тому

    9:15

  • @coreC..
    @coreC.. 17 днів тому

    This is a clear explanation. Very good.

  • @sarvanisah2746
    @sarvanisah2746 18 днів тому

    if we are using vi config.yml for vim ide , what command we will use for vs code ide?

    • @themoderncoder
      @themoderncoder 17 днів тому

      If you use VS Code you can either open config.yml manually via the file explorer or (if you've configured VS Code to be able to launch from the command line code.visualstudio.com/docs/setup/mac#_launching-from-the-command-line) you could type "code config.yml"

  • @rezakaaccount
    @rezakaaccount 18 днів тому

    Production quality is remarkable.

  • @mehdizahedi2810
    @mehdizahedi2810 18 днів тому

    Fantastic explanation, resolved all my confusion about merging. Thanks

  • @kaibe5241
    @kaibe5241 18 днів тому

    This isn't even close to being definitive... It skips over so many features that git provides for managing conflicts.

  • @CristianHeredia0
    @CristianHeredia0 18 днів тому

    Great content! What are you using to make slides?

    • @themoderncoder
      @themoderncoder 18 днів тому

      I use Apple Motion to create the animations. Then stitch all the animations together with Final Cut. It’s a bit of a manual process unfortunately - these videos take me a very very long time to make lol

  • @davidpaez_co
    @davidpaez_co 18 днів тому

    This is honestly the best git course in all UA-cam. Thank you so much!

  • @himanshutripathi5735
    @himanshutripathi5735 19 днів тому

    So we merge after rebase? just rebase and push is bad practise? Please clarify. Thanks!

    • @themoderncoder
      @themoderncoder 19 днів тому

      Generally yes. This video should clear your question up ua-cam.com/video/zOnwgxiC0OA/v-deo.htmlsi=jsqtiCaVkMr2WBLr

  • @azolee
    @azolee 19 днів тому

    in my almost 15 year of using Git, this is by far the best video on how to use merge and rebase. thank you!

    • @themoderncoder
      @themoderncoder 19 днів тому

      Really appreciate you saying that. It means a lot coming from someone like you with so much experience. If you have a chance to share this video with someone who might benefit, please do. Cheers!

    • @azolee
      @azolee 19 днів тому

      @@themoderncoder already did it :)

  • @edgarlip2
    @edgarlip2 20 днів тому

    very cool , thank you !!!

  • @davidgood840
    @davidgood840 20 днів тому

    As a single dev , I only ever use rebase amd NEVER merge just to keep the history strictly linear , however this is a luxury that larger teams might not have . The tip about only using rebase for your own local work is 100% the right way to use it , imo .

  • @daymenpasick7825
    @daymenpasick7825 21 день тому

    My guy at the very beginning when you described git pull as being a combination of fetch and merge...it already instantly clicked for me xD thank you!

  • @EzMC2
    @EzMC2 21 день тому

    Nicely done, thanks my dude.

  • @yssplays2620
    @yssplays2620 22 дні тому

    new subscriber. best explain very very very nice

  • @SalvadorAguilar
    @SalvadorAguilar 25 днів тому

    Thank you a lot for this brother!

    • @themoderncoder
      @themoderncoder 25 днів тому

      For sure, glad it was helpful. If you know anyone else who would benefit, please share a link!

  • @tarsala1995
    @tarsala1995 27 днів тому

    I always squash and never allow teammates to work on my branch. This way you maintain main branch clean with only feature commits and avoid conflicts with teammate locally. The only use case I had was when I was introducing a big feature >100 files and split my PR into 6, then I was rebasing branches in order of building block of the feature, where last branch was rebased into main feature branch after reviews of my peers.

    • @themoderncoder
      @themoderncoder 27 днів тому

      This a good anecdote for folks - in the real world sharing branches is not very common and workflows like you describe are more the norm.

  • @jojje3000-1
    @jojje3000-1 28 днів тому

    Git mergetool is also useful

  • @ekchills6948
    @ekchills6948 28 днів тому

    Best explanation

  • @fouadchahd2969
    @fouadchahd2969 28 днів тому

    Please can u provide commads also

    • @themoderncoder
      @themoderncoder 27 днів тому

      This is the video you’re looking for: Git MERGE vs REBASE: The Definitive Guide ua-cam.com/video/zOnwgxiC0OA/v-deo.html

  • @RakeshKumar-tu6bi
    @RakeshKumar-tu6bi 29 днів тому

    perfect