What are git worktrees, and why should I use them?
Git worktrees have been around since 2015, but it wasn’t until recently they became popular. Learn what they are, how to use them, and why you might.
Build what's next on GitHub, the place for anyone from anywhere to build anything.
Join us October 28-29 in San Francisco or online for GitHub Universe, our flagship developer event uniting people, agents, and the world's code.
Learn more about the security vulnerabilities affecting Git 2.26.1 and older.

A couple of days ago, Git released v2.26.1 to address a critical vulnerability in the credential helper mechanism. Today, the Git project is releasing another round of updates to address a related issue that’s present in v2.26.1 and older.
This vulnerability allows a malformed URL to create a credential pattern inside Git with some fields left blank. Many credential helpers interpret these blank values as an instruction to match any credential. This can result in leaking values from the underlying credential store to untrusted sources, sending the password stored for one server to another.
These updates address this new issue by not invoking the credential helper at all when the URL contains an un-representable value.
Note that not all credential helpers behave in a way that triggers the vulnerability. Git’s own store and cache helpers, along with the osxkeychain helper, are known to be vulnerable. Git Credential Manager for Windows is known to be unaffected. Other helpers should be assumed to be affected.
The most effective way to protect against this vulnerability is to upgrade to v2.26.2. If you can’t update your client immediately, reduce your risk by following the same guidelines we recommend for v2.26.1:
--recurse-submodules against untrusted repositories.GitHub has implemented additional steps on top of the ones we took to protect against the attacks discovered in v2.26.1. Specifically, that means:
.gitmodules (including new variants discovered in v2.26.2) are blocked from being pushed to GitHub.com.Credit for finding these vulnerabilities goes to Carlo Arenas, as well as further analysis by Jonathan Nieder of Google.
Git worktrees have been around since 2015, but it wasn’t until recently they became popular. Learn what they are, how to use them, and why you might.
Discover how to use VS Code to interact with GitHub and maintain your projects.