Git 3.0: What Is Planned
Git 3.0 is the next major version of Git: the first release since Git 2.0 in 2014 that is allowed to change default behavior in ways that can break existing setups. The Git project keeps the list of planned changes in its own documentation, in the file Documentation/BreakingChanges.adoc (published as BreakingChanges on git-scm.com). The most important plans are SHA-256 object IDs and the reftable format for new repositories, and main as the default branch name. Everything on this page is a plan, not a release: as of November 15, 2026, when this page was last checked, the document says "There is no planned release date for this breaking version yet", and the latest release is Git 2.56.
It is like a city's published plan to change which side of the road buses use. The plan, the reasons and the order are announced years ahead, so that everyone can prepare, but the date is set only when everything is ready.
The Planned Changes at a Glance
| Change | Today (Git 2.x) | Planned for Git 3.0 | Try it now |
|---|---|---|---|
| Object IDs for new repositories | SHA-1 (40 hex digits) | SHA-256 (64 hex digits) | git init --object-format=sha256 |
| Reference storage for new repositories | files (one file per ref) | reftable (a compact table format) | git init --ref-format=reftable |
| Default branch name | master, with a hint to choose | main | git config --global init.defaultBranch main |
| Bare repositories found by searching | Allowed (safe.bareRepository=all) | Only when named explicitly (explicit) | git config --global safe.bareRepository explicit |
| Building Git from source | Rust optional | Rust required | (affects people who build Git) |
The document also lists removals: git whatchanged, git pack-redundant, the old "grafts" file (.git/info/grafts, replaced by git replace), remotes defined in the old .git/branches/ and .git/remotes/ folders, git name-rev --stdin (replaced by --annotate-stdin), and the settings core.commentString=auto and core.preferSymlinkRefs=true. Commands that are not going away include git checkout: the document says checkout, switch and restore will all stay.
Example 1: The Default Branch Name
Without a setting, git init still names the first branch master today, and says that this will change:
GIT_CONFIG_GLOBAL=/dev/null git init demo
git -C demo symbolic-ref --short HEADhint: Using 'master' as the name for the initial branch. This default branch name
hint: will change to "main" in Git 3.0. To configure the initial branch name
hint: to use in all of your new repositories, which will suppress this warning,
hint: call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
hint:
hint: Disable this message with "git config set advice.defaultBranchName false"
Initialized empty Git repository in /home/navika/projects/demo/.git/
masterExplanation: GIT_CONFIG_GLOBAL=/dev/null hides the global settings for this one command, to show what Git does on a fresh computer. The hint says the default "will change to "main" in Git 3.0". Setting init.defaultBranch yourself, as "Git Config" showed, makes the change a non-event: your new repositories already use main.
Example 2: A SHA-256 Repository
Every object ID in Git is a hash (see "Git Objects"). SHA-1 is still protected in Git against the known collision attack (see "Signing Commits and Tags"), but SHA-256 is far stronger, so Git plans to use it for new repositories. You can create one today:
git init --quiet --object-format=sha256 fee-tracker-256
cd fee-tracker-256
echo 'Term fee: $12,000' > fees.txt
git add fees.txt
git commit --quiet -m "Add the term fee"
git rev-parse --show-object-format
git rev-parse HEAD
git log --onelinesha256
74367b8a778a3b979521c24be4e1fe16fe9fc47be15443cb579fc8f18645645d
74367b8 (HEAD -> main) Add the term feeExplanation: the full commit ID has 64 hex digits instead of 40, while the short form in git log --oneline looks the same as before. Everything else works as usual. The catch is the ecosystem: a SHA-256 repository can't yet exchange history with SHA-1 repositories, and not every hosting platform or tool supports it, which is exactly the prerequisite the BreakingChanges document names before the default can change. The document also says there is no plan to stop supporting SHA-1 repositories.
Example 3: The Reftable Format
In the files format, every branch and tag is a small file under .git/refs, with many refs packed into .git/packed-refs. In repositories with hundreds of thousands of refs, that is slow, and on case-insensitive file systems, feature/A and feature/a clash. Reftable stores all refs, and their reflogs, in a few compact binary tables:
cd ..
git init --quiet --ref-format=reftable fee-tracker-reftable
cd fee-tracker-reftable
echo 'Term fee: $12,000' > fees.txt
git add fees.txt
git commit --quiet -m "Add the term fee"
git branch feature/late-fee
git rev-parse --show-ref-format
cat .git/HEAD
git refs list --format="%(refname)"reftable
ref: refs/heads/.invalid
refs/heads/feature/late-fee
refs/heads/mainExplanation: .git/HEAD contains a placeholder (refs/heads/.invalid) that only exists so that older Git versions still recognize the folder as a repository; .git/refs is a placeholder too. The real refs are in .git/reftable, and git refs list reads them. Git commands work exactly as before. An existing repository can be converted:
cd ../fee-tracker-256
git rev-parse --show-ref-format
git refs migrate --ref-format=reftable
git rev-parse --show-ref-format
git log --onelinefiles
reftable
74367b8 (HEAD -> main) Add the term feeExplanation: git refs migrate rewrote the references in the new format, keeping every branch and commit. (The object format can't be converted this way; changing SHA-1 to SHA-256 means rewriting all history.) Some tools that read .git/refs files directly, rather than asking Git, don't understand reftable yet, which is the prerequisite named for this change.
Example 4: Commands Nominated for Removal
Commands planned for removal already refuse to run unless you confirm that you still need them:
git whatchanged 2>&1 | head -5'git whatchanged' is nominated for removal.
hint: You can replace 'git whatchanged <opts>' with:
hint: git log <opts> --raw --no-merges
hint: Or make an alias:Explanation: git whatchanged is an old form of git log --raw, and Git tells you exactly what to use instead. Adding --i-still-use-this makes it run for now, and the message asks people who still need it to tell the Git mailing list.
How to Prepare Today
| Do this now | Why |
|---|---|
git config --global init.defaultBranch main | New repositories already match Git 3.0 |
Replace git whatchanged with git log --raw --no-merges | It will be removed |
Use git replace instead of .git/info/grafts | Grafts will be removed |
Define remotes with git remote add, not files in .git/remotes/ | The old folders will be ignored |
Check that your tools ask Git for refs instead of reading .git/refs files | Reftable will be the default for new repositories |
Name bare repositories explicitly in scripts (--git-dir or GIT_DIR) | safe.bareRepository will default to explicit |
Follow BreakingChanges.adoc and the release notes | The list can change before the release |
The BreakingChanges document also describes a build of Git with all planned changes turned on (make WITH_BREAKING_CHANGES=YesPlease), so that tool authors can test early, and says the last Git 2.x version before 3.0 will be a long-term support release, with bug fixes for at least four release cycles and security fixes for six.
Common Mistakes
Announcing a Git 3.0 release date. None has been set. Check the BreakingChanges document and the release notes.
Thinking existing repositories will be converted. The new defaults are for new repositories.
Switching real projects to SHA-256 today. Many platforms and tools can't host or read them yet.
Writing scripts that read .git/refs files directly. Use git rev-parse, git for-each-ref or git refs list, which work with every format.
Under the Hood
The object format is fixed when a repository is created and is recorded in .git/config as extensions.objectFormat = sha256, with core.repositoryFormatVersion = 1, so older Git versions that don't understand it refuse the repository instead of misreading it. The ref format is recorded the same way, as extensions.refStorage = reftable. Reftable keeps refs in sorted, immutable tables listed in .git/reftable/tables.list; each update writes a small new table, and Git compacts tables in the background, so reading one ref, or all refs under a prefix, needs few file reads, and updates of many refs are atomic. Git 3.0's work toward SHA-256 interoperability includes a planned mapping between SHA-1 and SHA-256 IDs, so that one day repositories in either format can exchange history.
Interview Corner
What will change in Git 3.0?
According to Git's BreakingChanges document: new repositories will use SHA-256 and the reftable ref format by default, the default branch will be main, safe.bareRepository will default to explicit, Rust will be required to build Git, and old commands such as git whatchanged and git pack-redundant will be removed. There is no release date yet.
Why is Git moving to SHA-256?
SHA-1 collisions have been demonstrated. Git detects the known attack, but SHA-256 is much stronger. New repositories will use it once hosting platforms and tools support it.
What is reftable?
A storage format for references and reflogs that keeps them in compact, sorted tables instead of one file per ref. It is faster for repositories with many refs, makes multi-ref updates atomic, and avoids case-sensitivity clashes.
Will git checkout be removed?
No. The BreakingChanges document says checkout, switch and restore will all stay.
Practice
Challenge: a Git 3.0-style repository. Create a repository named future with both planned defaults, using settings instead of options, and print its object format, ref format and branch name.
What does Git print? Before you open the solution, decide which three values it prints.
Show solution
cd ..
git -c init.defaultObjectFormat=sha256 -c init.defaultRefFormat=reftable init --quiet future
git -C future rev-parse --show-object-format --show-ref-format
git -C future symbolic-ref --short HEADsha256
reftable
mainsha256, reftable and main. The -c options set the two init settings for this one command; in a global config, they would apply to every new repository, as Git 3.0 plans to do by default. main comes from this page's global init.defaultBranch.
Checkpoint. Read the current BreakingChanges page on git-scm.com, and compare it with the table at the top of this page. Note anything that was added, changed or removed since November 15, 2026.
Key Takeaways
Quick reference
| Command | It is used to |
|---|---|
git init --object-format=sha256 | Create a SHA-256 repository |
git init --ref-format=reftable | Create a reftable repository |
git refs migrate --ref-format=reftable | Convert an existing repository's refs |
git rev-parse --show-object-format --show-ref-format | Show a repository's formats |
git config --global init.defaultBranch main | Use main for new repositories |
Was this tutorial helpful?