6 ms·
Highlights from Git 2.38
- jhrmnn 4y ago--update-refs is great, resetting dependent branches after rebasing has been a constant source of annoyance
- _joel 4y agoooh, interesting.
- seqizz 4y agoLooks good, but I wonder how my colleagues' local checkouts will respond to "updated refs" when pulling/pushing
- CGamesPlay 4y agoI don’t see how it would cause a problem unless you force pushed.
- theptip 4y agoNo differently to the previous way of doing stacked PRs? There's no getting around the fact that you're force-pushing a new version of each branch in the stack. This just automates the previously-manual process of checking out branch2 and rebasing it to point to branch1, instead of pointing to the commit that branch1 referenced pre-rebase.
- cryptonector 4y agoI usually just `git rebase --onto` any dependent branches. I will have to see if `--update-refs` is more convenient (it should be) and if it works well enough for me.
- rubyist5eva 4y ago--update-refs sounds fantastic, can't wait to try it out - I run into this problem all the time and rebasing multiple branches is such a PITA.
- rurban 4y agoI script around such rebases daily. Even in cronjobs, to keep my forks and patches uptodate. Wonder if the new option is as stable as my scripts.
- zimbatm 4y agoIt seems odd that `scalar` is not a sub-command of `git`. Does anybody know the reason behind this?
- yamtaddle 4y agoOn top of that, it reads like scalar is essentially just a different default config profile. This approach feels... wrong.
- chrsig 4y agoit seems like it was made at microsoft, using .net[0] I agree it seems quite strange that it's not a git subcommand now that it seems like it's been incorporated into the git core release. I'm not exactly sure of it's utility...seems kinda heavy weight to just be setting recommended configurations? I guess it does some background automation for fetching and gc? [0] https://devblogs.microsoft.com/devops/introducing-scalar/ https://devblogs.microsoft.com/devops/introducing-scalar/
- iudqnolq 4y ago> I'm not exactly sure of it's utility...seems kinda heavy weight to just be setting recommended configurations? According to the email linked in your sibling, that's exactly why it's a separate command in /contrib and not integrated into git proper.
- jsmith45 4y agoSince that original patch, the codebase was moved out of contrib and is now scalar.c alongside the other git source files. Remaining a seperate command rather than a subcommand is motivated by command line backwards compatibility for users of the c version from microsoft/git, but also for users of the older C# version. If they did git-scalar then they would still need a contrib subfolder command wrapper executable (not just a script, as many users are on windows and rely on it being an executable, not just a bash script).
- daxelrod 4y ago
- neves 4y agoOther day I started using a remote machine and after some months a git command behaved unexpectedly. I checked git version and it was a very old one. I realized that I'm not using any new feature of git. What am I missing? Which somewhat newer Git feature or configuration are you using that is useful?
- yamtaddle 4y agoOnly thing I know of that's fairly recent that I use is sparse-checkout: https://www.git-scm.com/docs/git-sparse-checkout https://www.git-scm.com/docs/git-sparse-checkout It's another feature that's mainly useful for large repos. Everything else I use was there a decade or more ago, I think.
- BlackLotus89 4y agossh key signing and probably some commands like switch...
- smegsicle 4y agoswitch and restore, though still both marked experimental, are often cleaner interfaces to common tasks otherwise buried in branch, checkout, and reset
- Myrmornis 4y agodiff.colorMoved can be quite useful (not sure when it was added) https://git-scm.com/docs/git-diff#Documentation/git-diff.txt---color-movedltmodegt https://git-scm.com/docs/git-diff#Documentation/git-diff.txt...
- psd1 4y ago3-way conflict visualisation is excellent. It allows you the original parent as well as the current and incoming. Saves so much faff figuring out how to resolve a conflict. https://medium.com/@karol.rossa/git-3-way-merge-addc2728c300 https://medium.com/@karol.rossa/git-3-way-merge-addc2728c300
- onedognight 4y agogit range-diff is great for seeing what changed after a rebase. It shows you which commits were added, removed, reordered, and changed (with a diff of course) all with color.
- sylware 4y ago
- einpoklum 4y ago1. The Linux kernel is one of a million use cases of git. 2. C++ developers have no problem with git 3. You don't have to use newer versions of the C++ standard if you don't want to.
- sylware 4y agogit code is still plain and simple C with a simple makefile build system.
- beermonster 4y agoA large chuck used to be shell scripts and Perl. Not sure if this is still the case but always made the Windows experience worse.
- sylware 4y agoAs far as I know I have 0 perl, and hardly any shell (SH and not bash) script.
- sedatk 4y ago> Linus T. failed to resist rust Yeah, no way Linus would judge something on its own merits. Must be a failed saving throw.
- wseqyrku 4y agoThere should be a centralized/online/connected mode for git where commands are executed on the server and only relevant stuff is downloaded locally.
- WhyNotHugo 4y agossh?
- hk__2 4y agogit is decentralized, so I don’t think this should be part of the tool itself.
- kjeetgill 4y agoImagine how often people mess up their repos and tangle up commits. Now imagine it's your company's remote.
- rzz3 4y agoIs Scalar really written in C#, doesn’t run on Linux, and is now part of the git codebase? I’m confused.
- gliptic 4y agoWhy would you think it doesn't run on Linux, or that it's in C#? EDIT: Ok, it used to be a .NET application (not any more), but .NET runs fine on Linux.
- rzz3 4y agoYeah, I had searched github for it and saw Microsoft’s C# repo for it.
- masom 4y agoNo, the article just mentions it started as C#.
- bjackman 4y agoAnyone have experience with using Scalar? How is it? How far can it scale? I'm also curious how they managed to drive it into the Git project. Presumably there can't be that many orgs out there for whom git repo size is a bottleneck. My rationale there is that the Linux kernel has thousands of contributors and vanilla Git scales ok there. Maybe I'm being naïve about something?
- willswire 4y agoSome companies use monorepos with over .5 million files and a 6.4 GB working tree size (Twitter, Uber, etc.) The Scalar feature of git is answered prayer for devs at such companies where an average git status command can take upwards of 30s! Source: I attended the Git Merge 2022 conference in Chicago, IL last month.
- JeremyNT 4y agoI know there are advantages to monorepos but when I hear such stories I just scratch my head. How did they let things get so bad that this would be the case? Surely the advantages monorepos provide would eventually have been overshadowed by the abysmal performance. It seems like they must have already split the repo, switched to something other than git, or devised custom tooling to handle the pain. Obviously MS devised such tooling and here we are... but have others just been quietly doing similar internally and never showing it the light of day?
- lbotos 4y ago> Presumably there can't be that many orgs out there for whom git repo size is a bottleneck. There are many large orgs that are using pretty large monorepos. Which surprised me. Source: see my profile :)
- skirmish 4y agoGoogle evaluated git for use internally and rejected it, partially because it was not able to handle its huge monorepo well.