Skip to content

[content-init] Don't set a remote tracking branch when creating a local branch for an issue context #4367

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 1, 2021

Conversation

jankeromnes
Copy link
Contributor

@jankeromnes jankeromnes commented Jun 1, 2021

Fixes #4366

How to test

Option 1:

  • Click here to open an issue in Gitpod
  • Make a commit
  • Verify that clicking "Push/Pull" in the bottom status bar offers to create a new branch, and doesn't offer to push to origin/main

(⚠️ Don't actually push your commit to the Gitpod repo 😅)

Option 2:

  • In any Git clone, run git checkout -B test-branch1 origin/HEAD -- observe that test-branch1 has a remote tracking branch set to origin/main
  • Next, run git checkout -B test-branch2 origin/HEAD --no-track -- observe that test-branch2 doesn't have a remote tracking branch (just like when you run git checkout -B test-branch0)
  • You can see this in git branch -vv as well

Copy link
Contributor

@JanKoehnlein JanKoehnlein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the fast fix

@JanKoehnlein JanKoehnlein merged commit 2148205 into main Jun 1, 2021
@JanKoehnlein JanKoehnlein deleted the jx/fix-issue-upstream branch June 1, 2021 16:33
jankeromnes added a commit that referenced this pull request Jun 2, 2021
MatthewFagan pushed a commit to trilogy-group/gitpod that referenced this pull request Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When opening an issue in Gitpod, the IDE now wants to push to the wrong upstream branch
2 participants