Next newsletter goes out tomorrow with an extra merge conflict tip: mobirony.ck.page/4a331b9076
@ivanbozhkov2709
8 күн бұрын
Love that. I will never use it.
@elijahshadbolt7334
7 күн бұрын
Same
@baronhelmut2701
6 күн бұрын
I agree to about 70%. 70% of me knows that if that problem is that far behind in the commit history that I have to binary search for it, it might be time to rework my testing methodology. But the other 30% sees how when your team is really big and they all work on the same master, you definitely could make quick work of faulty commits.
@TesterAnimal1
6 күн бұрын
You will.
@baronhelmut2701
6 күн бұрын
@@TesterAnimal1 nah. I mentioned this in another comment. This will only ever be necessary if your dev team is outrageously big and somehow working on one master. Which is quite unusual, in of itself. Obviously if there is a giant makefile tree involved, this might come in handy maybe once in three years. But really not something you should need frequently. If you do, work on the testing strategy, not on finding the errors.
@mrclaytron
5 күн бұрын
You have probably only worked on smaller projects/teams. If you work with a large team of Devs on a project with hundreds of commits per day, then you WILL use this 100%. I've done the painful manual process described in this video countless times (I'm talking about large projects with MILLIONS of lines of code where it's not uncommon to have less than 100% test coverage for features). I really wish I knew about bisect sooner - for senior developers working on large commercial or government projects, bisect is invaluable to know.
@tomihawk01
8 күн бұрын
One of the biggest obstacles to Git Bisect is team members with bad Git discipline and make commits that don't build. Last time I used it I had make fixes on a bunch of files, which I then had to undo to continue the bisect. Good Git discipline is important to take advantage of the "extra" features of Git.
@JoshuaMorony
8 күн бұрын
In a team setting I like the idea of having PRs as the "unit of change", so in the end you would have your main branch containing squashed commits of working PRs, and could then always utilise a feature like this (at least at the PR level) even if people don't have super clean commits
@hundvd_7
8 күн бұрын
Squashed PRs for the win
@DryBones111
7 күн бұрын
Yep, I like this too. Squashed PR, fast-forward merge only.
@RandomGeometryDashStuff
7 күн бұрын
@@hundvd_7does "squashed" mean merge but storing only first parent in commit header?
@mskiptr
7 күн бұрын
if others push bad commits, they should prepare for a force push
@vlmath314
8 күн бұрын
Thanks. There is also the "git bisect run" command to run the tests (check and continue the bisect as needed)
@Tondadrd
7 күн бұрын
This. I expected him to say "and this is what git bisect run is for, so we can automate this step too"
@Tondadrd
7 күн бұрын
I would honestly consider reuploading the vid with this additional tip to make it complete.
@TwoLeggedTriceratops
4 күн бұрын
That makes it a hell of a lot more useful and automated.
@AJMichels
6 күн бұрын
You can tell bisect to execute that test command for you on each commit and it will work its way through the commits automatically based on whether the command returns an error status (non-zero), which most test runners will do. Check out the “run” sub command. Not sure how one would do that with lazy git, or if it is even possible.
@funkynerd_com
7 күн бұрын
I have done this sooo many times, yet it is still so rare that my biggest challenge is going to be remembering this is a thing.
@elatedbento
3 күн бұрын
Great audio quality. Excellent video quality. Interesting "CLI" topic. Subscribed.
@nyalakanmerahmu
2 күн бұрын
Damn, definitely need more of this content around here. I use lazygit regularly, but still haven't use most of the feature. Thanks man!
@JoepKockelkorn
8 күн бұрын
I don't find the temporary untracked file approach hacky. I wouldn't know how to do it otherwise. What might be good to add is that you have to install the correct node version and do an npm install as well so you have the correct dependencies available to run the test. Because the bug could also be in the dependencies, in my experience quite often actually.
@elmalleable
7 күн бұрын
hello docker , hello can you here me, does the container have reception, hello can you, ahhh docker daemon is out of coverage area
@JoepKockelkorn
7 күн бұрын
@@elmalleable What are you on?
@elmalleable
6 күн бұрын
@@JoepKockelkorn hmmm good question. What's your guess?
@JansthcirlU
7 күн бұрын
Rather than pop the stash, you could also apply it so that the stashed changes don't get removed every time.
@JoshuaMorony
7 күн бұрын
Good suggestion
@ARKGAMING
7 күн бұрын
Ever since I learned about git bisect, I've been amazed at how great it is. The only problem is at my team we squash commits before merging to Dev, so if the bug was created during a big pr, it could still theoretically take a while to figure out why it happened, but it didn't happen to me yet
@vlmath314
6 күн бұрын
@@ARKGAMING big pr, easy, full revert the offending commit, even if full of other things. Yes, I hate squash commits... :)
@tordjarv3802
7 күн бұрын
Interesting feature, I haven’t encountered that problem since I started to do small feature branches and make sure to never merge with main unless all tests passes.
@DeadLikeYou
7 күн бұрын
Ive done this, actually with a script, so it will search automatically with a test. It searched something like 20 commits, it was like magic. Yea, you can run git bisect without needing manual intervention, so its done almost instantly. Of course it was because a coworker kept pushing commits without making sure there was no break or regression, but thats another story.
@elmalleable
6 күн бұрын
@@DeadLikeYou how many times that coworkers does that. After the fourth time. I might offer you cold coffee as humoric revenge. Don't break the build. Maybe you should get a hat that says build breaker and ward to the unfortunate dev of the day
@JakubSK
5 күн бұрын
I never, ever searched through commits this way.
@distrologic2925
2 күн бұрын
Cool tool but I never had the issue that i had to search my commit history to find the cause of a regression. Usually I just look at the code and debug it and find the problem.
@liftchampion
Күн бұрын
git blame: "am i a ***king joke for you?"
@w300x
7 күн бұрын
"when things break, I do a binary search of git". Really? I usually debug the error. D: Am I doing it wrong?
@JoshuaMorony
7 күн бұрын
Depends on the situation, but if something is broken that you know was working before, figuring out what went wrong with a bisect is probably going to be quicker + will give context of why the breaking change was introduced
@Turalcar
3 күн бұрын
Last time I used git bisect for a benchmark I fixed and found out it regressed since it was broken 4 years prior.
@lebaptoumetrage6396
7 күн бұрын
I always keep an untracked folder in all my projects specifically to have cross versions files for quick stupid testing.
@i3looi2
3 күн бұрын
One more thing to complicate my full devstack life with.
@julian_handpan
8 күн бұрын
You can also use stash and apply the stash with the test
@andrewplesniak5073
6 күн бұрын
I like your setup! Are your dot files public? Theme?
@JoshuaMorony
6 күн бұрын
Not all my dotfiles but my neovim config is: github.com/joshuamorony/lazyvim/ and I'm using ohmyzsh/powerlevel10k in the terminal, tokyodark theme for neovim
@GasterLab
4 күн бұрын
GOAT!
@Pewpewz
2 күн бұрын
🔥🔥🔥
@lucasnoetzold
3 күн бұрын
nice I've done this with checkout once, wish I knew this feature
@jurajhprobyt2107
3 күн бұрын
Dividing the interval in haly to find something Foster. Thats exactly is bisect.😊
@jm-alan
7 күн бұрын
Hey! Another JM in software engineering! What it do 😁
@htzfun
6 күн бұрын
love lazygit now even mroe
@hasdfgh2
5 күн бұрын
hi would you tell that what is the name of this module that can split the terminal into directories and file contents?
@JoshuaMorony
5 күн бұрын
I'm doing it with Neovim + NeoTree (comes as default with LazyVim) - if you're not interested in vim though you can also split your terminal with just tmux
@hasdfgh2
5 күн бұрын
@@JoshuaMorony thank you!
@blzrL
7 күн бұрын
What do you use in your terminal? Is that tmux?
@JoshuaMorony
7 күн бұрын
Yes, this is ohmyzsh/powerlevel10k/tmux/neovim
@aruprakshit7218
7 күн бұрын
Could you please also share your beautiful nvim setup. Please 🙏
@JoshuaMorony
7 күн бұрын
Sure, it's public here: github.com/joshuamorony/lazyvim/
@valentinasler155
5 күн бұрын
Aaaaah, if you had just followed TDD ... 😂
@JustinKahrs
7 күн бұрын
why not git blame on the line of the bug?
@HazelEyesDiver
7 күн бұрын
Sometime you don’t know where is the bug but you can git show the commit that introduces the bug to check it after you find it with bisect
@TheZazatv
7 күн бұрын
Unfortunately for big projects that are building for a long time. Bisect is not the best option otherwise it's a neat tool!
@duckner
6 күн бұрын
I just start up the debugger and fix the issue. Not hard, even on a repo with millions of lines
@Oominimaou2oO
3 күн бұрын
Or, with a real IDE you find the bug, you select the bug, and you do a "git show history"
@DarrylHebbes
8 күн бұрын
Easy?
@cluberic
8 күн бұрын
love how you didn't show how to make the screen you're looking at appear.
@SuperKavv
8 күн бұрын
He said he's using lazygit which is an open-source 3rd party terminal UI for Git. You just install that and run lazygit command, but you don't have to use it to do bisect commands.
@NeatMemesDotCom
19 сағат бұрын
Wait until he discovers git blame 😂
@tacobabyman1215
5 күн бұрын
Pretty much binary search. Cool
@Mr767267
Күн бұрын
It would be really fun if bisect feature is appended with a way to hookup a test and auto execute.
Пікірлер: 81