Git
linux
Git | linux | |
---|---|---|
305 | 1,048 | |
53,829 | 189,754 | |
0.9% | 1.7% | |
10.0 | 10.0 | |
7 days ago | 1 day ago | |
C | C | |
GNU General Public License v3.0 or later | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Git
-
Recommendations for designing magic numbers of binary file formats
Git interprets a zero byte as an unconditional sign that a file is a binary file [0]. With other “nonprintable” characters (including the high-bit ones) it depends on their frequency. Other tools look for high bits, or whether it’s valid UTF-8. These rules cover different common ways to check for text vs. bonary.
[0] https://github.com/git/git/blob/683c54c999c301c2cd6f715c4114...
-
I stopped everything and started writing C again
I second "Modern C" by Jen Gustedt.
- Get the `cdecl` tool to build intuition about function signatures. What does "int( * ( *foo)(void))[3]" mean?
- Write it yourself.
- Be disciplined. Develop good hygiene with compiler flags, memory/address checks, and even fuzzing.
- Read good source code such as the linux kernel. This is an amusing header file from the linux kernel that defines some banned files. This is wisdom if you choose to follow it: https://github.com/git/git/blob/master/banned.h
- Push the language to its limits. Play with memory and data structures. Inspect everything. This book "Data-Oriented Design" by Richard Fabien is a great to explore as well. It's about organizing your data for efficient processing.
-
Why "alias" is my last resort for aliases
```
Internally git uses the __git_complete function to set up completions for its subcommands, though this may be specific to your OS/distro and perhaps or git version.
This does seem to ship as part of git now, here[1].
[1]: https://github.com/git/git/blob/6a64ac7b014fa2cfa7a69af3c253...
-
Git clone –depth 2 is better than –depth 1 if you want to Git push
It isn't mangled. The commit is there as-is. Instead the repository has a file, ".git/shallow", which tells it not to look for the parents of any commit listed there. If you do a '--depth 1' clone, the file will list the single commit that was retrieved.
This is similar to the 'grafts' feature. Indeed 'git log' says 'grafted'.
You can test this using "git cat-file -p" with the commit that got retrieved, to print the raw object.
> git clone --depth 1 https://github.com/git/git
-
Why Git Subtree Requires Explicit Installation: Understanding Its Role and How It Becomes a Core Git Command
git clone https://github.com/git/git cd git/contrib/subtree
-
Oh Shit, Git?
Not trying to defend the choice of `git checkout` over `git switch` (and `git restore`) but they were introduced in v2.23 of Git [0], which was released about 5 years ago [1]. If you take a look at their help pages, they still include a warning that says
> THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.
Granted, it has been in there for basically as long as the command(s) existed [2] and after 5 years perhaps it might be time to no longer call it experimental.
Still, it does seem like `git checkout` might be a bit more backwards compatible (and also reflective of the time when this website was originally created).
[0] https://github.com/git/git/blob/757161efcca150a9a96b312d9e78...
- Git v2.48.1 security fixes for CVE-2024-52006 and CVE-2024-50349
-
Debugging with git bisect: A Smarter Approach to Bug Localization
Github: bisect
-
How to create own Python project in 5 minutes
Tools used on this article: psp: repository -- docs git: repository -- docs docker: repository -- docs make: repository -- docs python: repository -- docs
-
My Hacktoberfest Journey: From First Pull Request to the Hall of Fame
GIT Version Control System
linux
-
I stopped everything and started writing C again
Might not.
Rust has a state of the art sort implementation. There’s nothing faster, in any language - https://github.com/rust-lang/rust/pull/124032.
And sure, it’s possible that someone could write a C program that compares in speed to all the Rust programs I’ve mentioned. C is a Turing complete language after all. I’m only pointing out that it hasn’t happened in practice.
Also check the Android Binder code before (C https://github.com/torvalds/linux/blob/master/drivers/androi...) and after (Rust - https://android.googlesource.com/platform/frameworks/native/...). Same speed but the quality difference, it’s incomparable.
-
Rewriting essential Linux packages in Rust
> I wonder if Linux is re-written i(n) (sic) rust will it too remove GPL as a factor ?
No reason it must? AFAIK all Rust for Linux code is GPL2. For example see: https://github.com/torvalds/linux/blob/master/rust/kernel/al...
If some was or were to be licensed as MIT code, there is also plenty of dual licensed code in the Linux kernel.
-
Git Without a Forge
There are some hints regarding email clients here: https://github.com/torvalds/linux/blob/master/Documentation/...
-
OpenBSD Innovations
> The idea behind Pledge/Unveil was first in Landlock also.
This is so obviously, and verifiably untrue, that it's almost funny. The patch series and kernel commit adding Landlock to the Linux kernel even references OpenBSD pledge(2)/unveil(2).
https://github.com/torvalds/linux/commit/17ae69aba89dbfa2139...
https://lore.kernel.org/linux-security-module/20210422154123...
-
Languages in the Linux kernel
From github.com/torvalds/linux on 2025-02-19.
-
Linux kernel cgroups writeback high CPU troubleshooting
Interesting, thanks for sharing. We ended up solving our problem another way by adding this `DisableControllers` stanza to the service's systemd configuration: https://gist.github.com/dasl-/87b849625846aed17f1e4841b04ecc...
I believe the kernel's cgroup writeback accounting features are enabled / disabled based on this code: https://github.com/torvalds/linux/blob/c291c9cfd76a8fb92ef3d...
-
RISC-V Mainboard for Framework Laptop 13 is now available
It's not about the arm as an instruction set (I'm writing this from the arm machine running linux). It's the drivers, bootloader, all the fdt glue. You don't just need support for arm, but for the specific board on the specific SOC.
Want a different board on a soc that already works? Welcome to the world of writing this kind of things: https://github.com/torvalds/linux/blob/master/arch/arm64/boo... and compiling the kernel from some dude's branch instead of going with mainline.
-
Asahi Linux Lead Developer Hector Martin Resigns from Linux Kernel
Marcan is still posting to the LKML as himself too and he said he might contribute patches in the future if he feels like it. He just resigned as a maintainer:
https://github.com/torvalds/linux/commit/1b3291f00013c86a9bb...
So the title is factually correct (unless Sven Peter is another of his aliases, of course).
-
Beej's Guide to Git
If the tool is designed to support the use case of the 1% with concessions for the other 99%, the tool is badly designed.
Git is designed for the case where you have multiple remotes with no central authority. Except that’s not how any project I’ve _ever_ worked on functions in reality. It makes sense for some applications, but if I say that I run Linux, there’s an assumption that I’m running something compiled from https://github.com/torvalds/linux - I.e. there is a central space.
I’ve used git and perforce in anger for a decade, in teams of 1 to 150+ (with a brief blip in the middle where I tried plasticscm which was a mistake), and I’ve been the “git guy” on teams during that time. If git’s defaults were tweaked for “one origin, probably authoritative” and it had better authentication support out of the box it would be a significantly better experience for 99% of people. Those 1% of people who are left over are going to customise their config anyway, so make them add the distributed-defaults=true flag and the rest of us can get on with our work.
-
Resistance to Rust abstractions for DMA mapping
Nitpick: There are actually a handful Rust drivers in-tree, e.g. https://github.com/torvalds/linux/blob/master/drivers/net/ph...
Though, I think all of them are direct ports of existing drivers.
What are some alternatives?
Subversion - Mirror of Apache Subversion
zen-kernel - Zen Patched Kernel Sources
jj - A Git-compatible VCS that is both simple and powerful [Moved to: https://github.com/jj-vcs/jj]
winapps - Run Windows apps such as Microsoft Office/Adobe in Linux (Ubuntu/Fedora) and GNOME/KDE as if they were a part of the native OS, including Nautilus integration.
vscode-gitlens - Supercharge Git inside VS Code and unlock untapped knowledge within each repository — Visualize code authorship at a glance via Git blame annotations and CodeLens, seamlessly navigate and explore Git repositories, gain valuable insights via rich visualizations and powerful comparison commands, and so much more
freeCodeCamp - freeCodeCamp.org's open-source codebase and curriculum. Learn to code for free.