The Modern Coder
The Modern Coder
  • Видео 74
  • Просмотров 2 155 581
Git PULL vs FETCH
.
More lessons like this: learngit.io/
Git collaboration basics (clone, fetch and push): ruclips.net/video/ByBGTkrQ-QU/видео.html
Git rebase explained (merge vs rebase): ruclips.net/video/zOnwgxiC0OA/видео.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...
Просмотров: 8 584

Видео

Git Fundamentals: Staging area, repository, working directory, file states, and commits tutorial.
Просмотров 3,7 тыс.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,3 тыс.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,6 тыс.4 месяца назад
The better way to learn Git: learngit.io/ Git branching video: ruclips.net/video/u-6ryWqAJR4/видео.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,6 тыс.5 месяцев назад
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
Просмотров 31 тыс.8 месяцев назад
👨‍💻 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 тыс.9 месяцев назад
👨‍💻 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
Просмотров 89 тыс.10 месяцев назад
Git MERGE vs REBASE: The Definitive Guide
Git REBASE Explained: Unveiling Rebase's Hidden Hazard
Просмотров 7 тыс.11 месяцев назад
Git REBASE Explained: Unveiling Rebase's Hidden Hazard
I’m making a big bet…
Просмотров 989Год назад
I’m making a big bet…
My toughest project yet
Просмотров 1,1 тыс.Год назад
My toughest project yet
Delete Git Commits Tutorial
Просмотров 40 тыс.Год назад
Delete Git Commits Tutorial
Change Git Commit Messages Tutorial
Просмотров 16 тыс.Год назад
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
Просмотров 11 тыс.Год назад
Resolve Git Stash Merge Conflicts
Git CHERRY PICK Tutorial
Просмотров 95 тыс.Год назад
Git CHERRY PICK Tutorial
Resolve Git Cherry Pick Merge Conflicts
Просмотров 35 тыс.Год назад
Resolve Git Cherry Pick Merge Conflicts
Basic TMUX tutorial & cheatsheet
Просмотров 4,7 тыс.Год назад
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,8 тыс.Год назад
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 тыс.5 лет назад
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

Комментарии

  • @aakarshanraj1176
    @aakarshanraj1176 2 дня назад

    nice

  • @aakarshanraj1176
    @aakarshanraj1176 2 дня назад

    really informative video

  • @dorzhavian8853
    @dorzhavian8853 4 дня назад

    After git rebase -i HEAD~n I got an error : cannot rebase : you have unstaged changes . Please commit or stash them. What to do ?

    • @themoderncoder
      @themoderncoder 4 дня назад

      You can’t have uncommitted changes in the working directory when you rebase. Run “git add .” Followed by “git stash” then you can run the rebase. After you’re done, pop those uncommitted changes from the stash using “git stash pop”. I have a whole video on stash if you want to take a deeper look

  • @ryanarpon158
    @ryanarpon158 4 дня назад

    Crystal clear explanation! Well done!

  • @cristinasanchez9029
    @cristinasanchez9029 4 дня назад

    clean graphics, love it

  • @cristinasanchez9029
    @cristinasanchez9029 4 дня назад

    great video but the vim part was too obvious for people who use it and maybe confusing to people who don't. I would have kept that out, the text editor is irrelevant at the end of the day, maybe they even have nano configured

    • @themoderncoder
      @themoderncoder 4 дня назад

      Yeah, I've struggled with this for a while. Folks need to know how to save and exit VI because it's typically the default text editor, but it's not very intuitive. Especially for beginners when Git just pops it open in the terminal. I fear if I leave this out, folks will get stuck at that part of the process

    • @cristinasanchez9029
      @cristinasanchez9029 3 дня назад

      @@themoderncoder yeah true that

  • @afsharanh
    @afsharanh 4 дня назад

    Even after 6 years, this was the best video explaining rebase.

    • @themoderncoder
      @themoderncoder 4 дня назад

      Check out the updated version! ruclips.net/video/zOnwgxiC0OA/видео.html

  • @benvan3721
    @benvan3721 5 дней назад

    Thanks. But if this tutorial is for a beginner, I wish you take it slow and elaborate about merging. When you say git merge localBranch, does it mean merging to local main repo? Because you're now the one to merge to the remote main, it's the lead in my case. Most tutorials I watched, most of them they just spit out what' merge or pull, not.,.../., I can read that

    • @themoderncoder
      @themoderncoder 4 дня назад

      Everything Git does is local until you push. You can assume this whole video is talking about only changing your local repository. Check out my video on remote repositories (ruclips.net/video/ByBGTkrQ-QU/видео.html), then come back to this video. I think that will clear a lot of things up.

  • @MrWardo2009
    @MrWardo2009 6 дней назад

    Thank you for making this!

  • @ozymet
    @ozymet 6 дней назад

    This combination of a simple description of the processes with a clear, simple visualization is gold. Many professional coaches should learn from this. I haven't seen such a good way to explain processes that can be easily overcomplicated for a long time. I bow to such skills.

  • @kapilganwani1827
    @kapilganwani1827 6 дней назад

    This series on git commands is easily one of the most easiest I've found to follow, kudos!

  • @radwamohamed4600
    @radwamohamed4600 8 дней назад

    Really it is a super helpful video, Thank you!

  • @iishanto
    @iishanto 9 дней назад

    Your approach of teaching git is awesome. I have cleared lots of my concept by watching your playlist.

  • @jkaryskycoo
    @jkaryskycoo 10 дней назад

    wait, i'm still learning but confused by how you rebased on the master branch. Should the rebase be run while on the feature branch? I'm very confused by this and feel lost now. Did you mean to rebase from master? I don't see how this could EVER work if you have other team members like you quoted. This video should be removed or at least have the dangers outlined better. Somebody is going to get into a LOT of trouble if they think they found a 101 how-to. I've learned a lot from all your content so thank you for that.

    • @themoderncoder
      @themoderncoder 10 дней назад

      Check out my updated video on rebase, it should answer these questions ruclips.net/video/zOnwgxiC0OA/видео.html. I should also say (since this has come up before) that what is shown in this video may not strictly be following best practice, but using rebase to move commits onto master is not inherently dangerous.

  • @abdullahalmosalami2373
    @abdullahalmosalami2373 10 дней назад

    9:19 That animation is not what a merge would look like of updates in `main` onto shared feature branches. It'd be like the 6:05 animation.

    • @themoderncoder
      @themoderncoder 10 дней назад

      Im confused a bit by your comment, maybe you can clarify. The 9:19 and 6:05 animation show the same workflow & animation - both rebase the feature branch then merge that branch into main. Both show a fast-forward merge.

    • @abdullahalmosalami2373
      @abdullahalmosalami2373 5 дней назад

      @@themoderncoder I was mistaken in what I thought you meant. I think I was thrown off from the wording. You said "merge to bring those changes back onto shared branches"; I know now you meant merge feature --> main, but I _thought_ you meant merge main --> feature. I thought this cuz the moment you said "merge", there was that extra commit in main that wasn't in the feature branch in the animation.

    • @themoderncoder
      @themoderncoder 4 дня назад

      Oh gotcha. Thanks for clarifying

  • @misnad
    @misnad 10 дней назад

    Great, btw, what font is that?

  • @pappont
    @pappont 10 дней назад

    The rule is simple: always use rebase. Just forget that merge exists. In the last 10 years I've made rebase literally thousands of times and I've made merge maybe 5-10 times (when there were big very badly mantained branches not suitable for rebase). Your branches should be small and short living so there should be no problems rebasing

  • @dinobulja
    @dinobulja 11 дней назад

    Thank you for this great explanation. To clarify, at 9:18, you say "use rebase to re-anchor your feature branch onto baseline". If I understand correctly, more accurate would be to say "use rebase to re-anchor your feature branch THAT WAS NEVER PUSHED TO THE REMOTE onto baseline"? This would mean, check git branch -a and if you dont see your local branch in remotes, you are safe to use rebase; otherwise, use git merge.

  • @jchardy316
    @jchardy316 11 дней назад

    We spend the whole video talking about rebase then in the end say that using rebase to merge into a main branch is bad practice. without any further explanation. When else would we use rebase? our shop is trying to get our developers using rebase consistently. so we're trying to explain to them why we do it

    • @themoderncoder
      @themoderncoder 4 дня назад

      The final section of the video (starting at 6:40) explains the potential downsides of using rebase to move commits onto a shared branch, like main. I think that's what you're looking for. For what it's worth, I don't personally believe that using rebase to move commits onto main, is bad practice, it just requires the user to be aware of the edge cases mentioned at 6:40

  • @cpakkala
    @cpakkala 12 дней назад

    Great series of videos; thanks. There is one very important thing, however, that everyone tends to gloss over regarding conflicts, and this cannot be understated: just because a merge or rebase results in no conflicts does not mean the resulting code is correct! Everyone who actually works in software development needs to be reminded of this constantly. You absolutely need to test your code after doing the merge/rebase (both testing of your new features as well as regression testing). The merging algorithms are not intelligent programmers... Furthermore, because you need to do this testing, it is always wisest to pull in changes from main to your branch and then test before merging or rebasing your branch back into main.

  • @mauro334
    @mauro334 13 дней назад

    I've just prepared my first hotfix release using your tips. My tag version is going to be in production next wednesday. 😝

  • @tirthankar9533
    @tirthankar9533 20 дней назад

    thanks for the video!

  • @savysavy-mv2qd
    @savysavy-mv2qd 21 день назад

    Thanks bro you just saved me

  • @deveshgarg
    @deveshgarg 21 день назад

    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 21 день назад

      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 22 дня назад

    Your videos are an absolute gem. Thank you

  • @christiansmyth1466
    @christiansmyth1466 22 дня назад

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

    • @themoderncoder
      @themoderncoder 20 дней назад

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

  • @christiansmyth1466
    @christiansmyth1466 22 дня назад

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

  • @devtommie114
    @devtommie114 23 дня назад

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

    • @themoderncoder
      @themoderncoder 23 дня назад

      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 23 дня назад

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

  • @carlosmillanmazzucco1766
    @carlosmillanmazzucco1766 23 дня назад

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

  • @fernandolordao2
    @fernandolordao2 23 дня назад

    Great class! Thank you!🙏🏼

  • @daedracrab1210
    @daedracrab1210 23 дня назад

    this is so helpful, thanks man

  • @abdelazizez-zahed5009
    @abdelazizez-zahed5009 24 дня назад

    gooog

  • @lemonteateacup
    @lemonteateacup 25 дней назад

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

  • @MrVipulLal
    @MrVipulLal 25 дней назад

    Nice format. Thanks

    • @themoderncoder
      @themoderncoder 4 дня назад

      Lol thanks. Definitely a bit of stretch for me, but I wanted to try something new

  • @TheKaosTux
    @TheKaosTux 25 дней назад

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

  • @irvanhardyanto7038
    @irvanhardyanto7038 25 дней назад

    Nice explanation, thankyou

  • @thibautizard
    @thibautizard 26 дней назад

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

    • @themoderncoder
      @themoderncoder 26 дней назад

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

  • @Matt-pd2cq
    @Matt-pd2cq 26 дней назад

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

  • @dayasagarpatil
    @dayasagarpatil 27 дней назад

    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 26 дней назад

      Appreciate you saying that! If you're looking for something new, my video on fetching/pulling (ruclips.net/video/T13gDBXarj0/видео.html) is essentially a follow up to this one.

  • @vasudevans948
    @vasudevans948 27 дней назад

    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 27 дней назад

      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 27 дней назад

    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 28 дней назад

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

  • @luiscarlosjayk
    @luiscarlosjayk 28 дней назад

    How do you make such beautiful animated presentations?

    • @themoderncoder
      @themoderncoder 28 дней назад

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

    • @luiscarlosjayk
      @luiscarlosjayk 28 дней назад

      @@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 28 дней назад

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

    • @agenticmark
      @agenticmark 28 дней назад

      Yep you nailed it. Great video man!

  • @kevanbarter
    @kevanbarter 29 дней назад

    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 29 дней назад

    Nice edit and animation

  • @TheRocreex
    @TheRocreex Месяц назад

    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 Месяц назад

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

  • @mxsniper223
    @mxsniper223 Месяц назад

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

  • @DavidPashley
    @DavidPashley Месяц назад

    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 Месяц назад

      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 Месяц назад

      @@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.