keybase / keybase/client

Git repo: Can't push detached commits

Open
#14,278 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
9.2k
Forks
1.3k
Avg merge
12h 58m
Merged PRs (30d)
56

Description

I'm relatively often working in detached head, or on a branch with some work-in-progress commits at the tip that I want to keep local, and I can't seem to push my changes unless there is a branch attached to the commit I want to push. For example if I'm currently on a "master" branch, this works:

`git push origin HEAD:master -f`

This won't work:

```
> git push origin HEAD^:master -f
Initializing Keybase... done.
Syncing with Keybase... done.
To keybase://private/USER/REPO
! [remote rejected] HEAD^ -> master (couldn't find remote ref "HEAD^")
error: failed to push some refs to 'keybase://private/USER/REPO'
```

And this won't work either:

```
> git checkout HEAD^ (now in detached head)
> git push origin HEAD:master -f
Initializing Keybase... done.
Syncing with Keybase... done.
To keybase://private/USER/REPO
! [remote rejected] HEAD -> master (unexpected client error: reference not found)
error: failed to push some refs to 'keybase://private/USER/REPO'
```

The same works fine with gerrit, github, a git remote over ssh, or a bare repository in kbfs.
keybase version 2.7.3-20181005191950+83f5d808a7

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the two detached-commit push commands against a Keybase remote, including the detached HEAD case, and compare them with the working SSH, Gerrit, and bare-KBFS cases described in the issue. Done means pushing a detached commit to the target branch succeeds without the remote-ref errors shown.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, go
Domain
backend, distributed-systems
Issue type
Bug
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.