question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Checking out remote branch does not work

See original GitHub issue

Describe the bug When clicking the checkout button for a remote branch that branch is not correctly checked out. A new local branch is created based on master, not the remote branch.

To Reproduce Steps to reproduce the behavior:

  1. Create a remote branch with at least two commits that are not in master.
  2. Open the Branches window in the git menu
  3. Click the checkout button on the remote branch created above
  4. Note that changes in the branch are not displayed in the UI
  5. Click Help > Show App Data Folder
  6. Navigate to Insomnia/version-control/git/[repo id]/git
  7. Run git log in that folder image
  8. Run git log origin/<branch name> image

Expected behavior When you click the checkout button the local branch is created based on the contents of the remote branch, not master

Desktop (please complete the following information):

  • OS: Windows 10
  • Installation Method: windows installer
  • App Version: 20221.2.1

Additional context If the remote branch is only 1 commit ahead of master this issue can be resolved by pulling. If the branch is 2 or more commits ahead the pull fails with the following error: image

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
diefessoncommented, Oct 10, 2022

Same isssue, checkout is not updating history and generating conflicts when pulling

1reaction
NicholasNagycommented, Oct 9, 2022

I am having this same issue. This makes it very difficult for me to use, as I have to manually cherry-pick commits from another branch into the branch that I want to develop on.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I check out a remote Git branch? - Stack Overflow
In both cases, start by fetching from the remote repository to make sure you have all the latest changes downloaded. In this case...
Read more >
Easily Perform Git Checkout Remote Branch [Step-by-Step]
Learn how perform Git checkout remote branch, effectively track remotes, and best practices to manage remotes and branches.
Read more >
Git Checkout Remote Branch Tutorial - freeCodeCamp
1. Fetch all remote branches · 2. List the branches available for checkout · 3. Pull changes from a remote branch.
Read more >
Git Checkout Remote Branch: Code Examples, Tutorials & More
There is no actual command called “git checkout remote branch. ... The new Git branch ensures changes don't threaten existing, working code.
Read more >
Git checkout remote branch: how it works and when to use
It is good to mention that git checkout remote branch is not an actual existing command. If you want to check out a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found