patrick91 / patrick91/shortcake

Missing remote branch tracking after running `shortcake submit` on a local-only adopted branch

Open
#26 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
4
Forks
0
Avg merge
4h 22m
Merged PRs (30d)
5

Description

When running shortcake submit after shortcake adopt on an untracked local branch, the newly created remote branch is not tracked

Expected behavior:

  • A remote branch gets created
  • The local branch tracks the remote branch

Current behavior:

  • A remote branch gets created
  • The local branch does not track the new remote branch

Example:

❯❯❯ git checkout -b some-branch
Switched to a new branch 'some-branch'

❯❯❯ sc adopt
Adopted branch 'some-branch' with parent 'main'

❯❯❯ sc submit
Submitting some-branch... created PR #2

Submitted PRs:
  • some-branch: https://github.com/buurro/some-repo/pull/2

❯❯❯ git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> some-branch

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

Reproduce the issue with a local branch using shortcake adopt, then shortcake submit, and inspect how submit creates the remote branch and records branch tracking. Done means the created remote branch is tracked by the local branch and a subsequent git pull no longer reports missing tracking information.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.