So You Think You Know Git Part 2 - DevWorld 2024

Sdílet
Vložit
  • čas přidán 11. 06. 2024
  • Scott Chacon's DevWorld 2024 talk on Git Tips and Tricks. Learn more at blog.gitbutler.com
    Scott talks about:
    00:00 Intro
    00:33 Welcome
    02:05 About Me
    02:24 How Well Do you Know Git
    03:19 Agenda
    03:31 Switch and Restore
    05:55 Hooks
    08:33 Attributes
    09:44 Smudge and Clean
    10:08 Smudge and Clean: RCS Keywords
    10:42 Smudge and Clean: Date
    11:14 Smudge and Clean: LFS
    12:25 Fixup Commits
    15:41 Rebasing Stacks
    17:58 Update Refs by Default
    18:15 Scaling Git: Scalar
    19:53 Worktrees
    21:23 GitButler
    22:43 Close

Komentáře • 68

  • @jasonhuang1447
    @jasonhuang1447 Před 2 měsíci +62

    Didn’t know Pedro Pascal is such a git nerd.
    Amazing talk btw!!

  • @drewnoakes
    @drewnoakes Před 2 měsíci +67

    It's not every day you learn several new git features to try out. Thanks for a great talk.

  • @positronalpha
    @positronalpha Před 2 měsíci +17

    I've used fixup commits and rebasing for many years. Can't see how you'd get a clean, meaningful history without it.
    Lovely talk as always!

  • @Jakob7539511
    @Jakob7539511 Před 2 měsíci +43

    Yoo I was really excited by the first talk, so great to see the part 2 :)

  • @Fazal828
    @Fazal828 Před 2 měsíci +15

    Presentation so fire you triggered the alarms haha. Loved both of these and I could listen/use many more :D

  • @ruroruro
    @ruroruro Před 2 měsíci +39

    17:13 I am apparently one of the "three guys". I wished for this option for a long time. This is a huge lifesaver.

    • @positronalpha
      @positronalpha Před 2 měsíci +1

      Agree, super useful.

    • @shyrealist
      @shyrealist Před 2 měsíci +2

      Came here to say this! `--update-refs` where have you been all my life!

    • @lindhe
      @lindhe Před 26 dny

      I love it! ❤

  • @SirGallahad09
    @SirGallahad09 Před 2 měsíci +2

    It's the best video I’ve watched the whole week. Thank you!

  • @AndreGreeff
    @AndreGreeff Před 2 měsíci +8

    had a thought around 5:11: I understand Linus' concept of not breaking backwards compatibility, so that `checkout` will continue to work even though there are newer commands that do the same thing, but if the idea is to have these new commands be "more semantic" than the old ones, why not at least show a message in terminal when using the old command to say "hey, there's a better way to do this now"...? surely that would help people who use Git every day (like me) to learn them more quickly.

  • @debemdeboas
    @debemdeboas Před 2 měsíci +6

    i love these talks

  • @ZevIsert
    @ZevIsert Před 2 měsíci +1

    Aside from the large repository stuff (scalar) I would have put my hand up for each question, and that makes me happy 😊 Great talk Scott!

  • @dudeman99999
    @dudeman99999 Před 2 měsíci +1

    Dude these talks are so useful!!

  • @Sandeep-zd6dq
    @Sandeep-zd6dq Před 2 měsíci

    Hey Scott,
    I was barely able to get 50% of part 1 (some super heavy stuff for beginners) but this part was like you created this one for us only 🙌 the way you present these talks is just awesome 😂 please continue this series and let’s see a demo of gitbutler in the next part of this series and how’s about continuing this series until we don’t cover all 145 commands 😅😂

  • @JanLund
    @JanLund Před 2 měsíci +1

    Great presentation style! 👍🔀🚀

  • @gratux
    @gratux Před 2 měsíci +1

    Damn, I would have appreciated knowing about worktrees about 2 weeks ago 🙃
    Always a chance to learn something new

  • @marcgrec5117
    @marcgrec5117 Před 2 měsíci +5

    great idea to not repeat the talk 👍

  • @silak33
    @silak33 Před 2 měsíci +11

    I had no clue you don't need to do an interactive rebase to make autosquash work anymore... Nice to know :)

    • @gitbutlerapp
      @gitbutlerapp  Před 2 měsíci +2

      I believe this was _very_ recently added. 2.44 I think, so maybe a month ago?

  • @mar-wv7rp
    @mar-wv7rp Před 2 měsíci +3

    Pretty glad I subscribed to the youtube channel :3

    • @gitbutlerapp
      @gitbutlerapp  Před 2 měsíci +2

      We're glad you did too! We'll try to make it worth your while. Let us know what you might like to see.

  • @gekylafas
    @gekylafas Před 2 měsíci

    `--update-refs` is great!

  • @stephiesmith6302
    @stephiesmith6302 Před 2 měsíci

    nice intro)

  • @v-sig2389
    @v-sig2389 Před 2 měsíci +4

    The most important thing to know about git : it is not a backup system, it is a collaboration system. You have to actually use backups with another software such as beyond compare, to reduce the risk of a bug in git that deletes files and folders.
    Sometimes you don't have 5 hours to become an expert at git and understand why it suddenly refused to save the modifications. The slightest mistake, misunderstanding, or misuse of a command can harshly punish you.

    • @positronalpha
      @positronalpha Před 2 měsíci +1

      No need to become an expert - you only need to understand the fundamentals to be able to work confidently with Git. Watch Chacon's original introduction in order to really grok Git, and you'll find that it's quite difficult to get it to lose your data. Just set a branch before doing something tricky. If you also push that branch to some remote, it's virtually impossible to lose your stuff.

    • @marcellkovacs5452
      @marcellkovacs5452 Před 2 měsíci +1

      It’s version control, first and foremost. I have plenty of repos where I’m the only developer.
      I agree that it’s not a backup solution, i.e . if your disk is corrupted and you haven’t pushed your commits, you might lose data. However, as long as your file system is intact and you committed your change, basically anything “lost” can be recovered via git reflog.

  • @blizzy78
    @blizzy78 Před 2 měsíci

    worktrees are awesome

  • @cusematt23
    @cusematt23 Před 2 měsíci +1

    If I had your public speaking skills I would be between 2x and 500x wealthier. Well done talk.

  • @Sandeep-zd6dq
    @Sandeep-zd6dq Před 2 měsíci

    Now onwards I will only use more domain specific/ explanatory commands instead of checkout I.e, switch and restore and allowing commit specific updates is also cool and yeah the best of all for jumbo repos I.e, scalar (any specific reason for not using git specific naming like git clone-heavy) 😂😎 I am feeling like if scalar might have introduced earlier then maybe pinterest never specify the refspec to reduce their clone time 🤪

  • @joshuathomasbird
    @joshuathomasbird Před 2 měsíci

    you didn't mention lefthook when talking about precommit and husky!!

  • @markusklyver6277
    @markusklyver6277 Před 2 měsíci

    Those YAML configurable hooks looks nice, can these be globalized? I didn't get it to work.
    With the attributes, that's a nice feature. I configured it so that in addition to calling exiftool, it also adds the hash (by making a script). This way you can see that it changed despite no change in exif data. You can also make it so git diff fires up the different pictures visually side by side, if you want to.

  • @mlajv
    @mlajv Před 2 měsíci +2

    Deeeespaaacito

    • @biggusmunkusthegreat
      @biggusmunkusthegreat Před 2 měsíci

      Man they really skirted the copyright with that 😂 cool how they turned it into a beat though.

  • @mandokir
    @mandokir Před 19 dny +1

    Scotch Cone.

  • @duwangchew
    @duwangchew Před 2 měsíci

    GitButler looks really cool and very helpful, but unfortunately switching to a GUI client would change my workflow too much so I have to stick with either using worktrees or straight up separate directories for different branches.

  • @ClAddict
    @ClAddict Před 2 měsíci +3

    Across the talks there have been several recommended git config -global options recommended. Is there a good place to go to see an exhaustive list of recommended configs based on new feature adds or even just a merge commit’s expert opinion on recommended config?

    • @markusklyver6277
      @markusklyver6277 Před 2 měsíci

      You can just read the git config man page.

    • @ClAddict
      @ClAddict Před 2 měsíci

      @@markusklyver6277 recommendation (n): a suggestion or proposal as to the best course of action, especially one put forward by an authoritative body.

    • @ruroruro
      @ruroruro Před 2 měsíci

      ​@@markusklyver6277 The man page for git config sucks for this (or at least it used to suck). It's huge and some of the more obscure options are documented extremely poorly (or even not documented at all).

  • @CyReVolt
    @CyReVolt Před 2 měsíci +1

    The "restore" command semantically often makes less sense for me. I frequently check out changes I have never seen, stemming from other branches or even remotes, so it is definitely not restoring anything. So in many cases it fits, just "checkout" is more general.

  • @MaxMalm
    @MaxMalm Před 2 měsíci +1

    Why is Scott against a rebasing flow?

  • @fxs2008
    @fxs2008 Před měsícem

    When working in JetBrains IDEs, I use Change lists: for example, I can create one for dev changes (that I definitely don't want to commit), other ones per branch. When commit, I select only needed change list(s) and other changes are not affected. Overall, JetBrains commit tab is quite comfortable for me.

  • @kevincozens6837
    @kevincozens6837 Před 2 měsíci +1

    I didn't see much in this talk that seemed of interest for me to look in to. I can see worktrees being useful. I already have multiple branches of a project checked out in to different directories but git doesn't know about the collection of directories. Using worktrees I can make it aware of the other branches being worked on.

    • @keyd33
      @keyd33 Před 2 měsíci

      Same here, I have like 5 different directories called git-1, git-2... I will try tomorrow

  • @for-ever-22
    @for-ever-22 Před 2 měsíci

    I was scared during the first few seconds of the video. Thought I was lost

  • @devviz
    @devviz Před 2 měsíci

    _ICT🌌1AM March 26th 2024_

  • @MichalFilipek
    @MichalFilipek Před 2 měsíci +1

    Update refs❤❤❤❤❤❤❤❤😂

  • @harry-smith404
    @harry-smith404 Před 2 měsíci

    Yeah, renase with references on top would be damn useful 2 years ago for me =)Now I just try not to use that approach

  • @bigyang5847
    @bigyang5847 Před 2 měsíci

    and yet, -q and --quiet still don't work consistently

  • @TesterAnimal1
    @TesterAnimal1 Před 2 měsíci

    Nope. I don’t think that! 😂

  • @K4iserchen
    @K4iserchen Před 2 měsíci +1

    Damn, coming at you with commit hooks 😢😢. Really bad stuff

  • @RazoBeckett.
    @RazoBeckett. Před 2 měsíci

    hi 🎉?

  • @hansvandenbogert8992
    @hansvandenbogert8992 Před 2 měsíci

    almost nobody used autofixup? Wth, I'll do you one better, start using git-absorb

  • @DeVibe.
    @DeVibe. Před 2 měsíci

    Nobody knows Git

  • @local-admin
    @local-admin Před 2 měsíci +1

    OhNo, there's more 🫣