keybase / keybase/client

[git] Cannot configure default branch name without manual intervention

Open
#24,452 3 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
9.2k
Forks
1.3k
Avg merge
12h 58m
Merged PRs (30d)
56

Description

I have started using main as my default Git branch instead of master (which is widespread now, and default for newer Git versions). Keybase git does not handle this well, as the master branch is empty, so pullers must git clone -b main ... to pull the main branch.

I believe that Keybase git should use the first pushed branch as its default branch name (this will accommodate both old git versions using master and newer git versions where main is default and the initial branch name is configurable), and probably the default branch should be configurable in the Keybase GUI.

The default branch can currently be changed by editing HEAD in the raw Git repository in .kbfs_git.

This is related to #22929.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the issue and related issue #22929, then inspect how Keybase Git repositories initialize and expose the HEAD file under .kbfs_git. Determine where the first pushed branch and GUI configuration would be handled. Done means a repository can use its first pushed branch as the default, with the default branch configurable without manually editing the raw repository.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, go
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.