Checking out remote branch does not work
See original GitHub issueDescribe 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:
- Create a remote branch with at least two commits that are not in master.
- Open the Branches window in the git menu
- Click the checkout button on the remote branch created above
- Note that changes in the branch are not displayed in the UI
- Click Help > Show App Data Folder
- Navigate to Insomnia/version-control/git/[repo id]/git
- Run
git log
in that folder - Run
git log origin/<branch name>
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:
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:6 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same isssue, checkout is not updating history and generating conflicts when pulling
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.