Skip to content

feature: double tap commit with tracked remote branch checks out loca… #1409

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

Conversation

NathanBaulch
Copy link
Contributor

My first feature PR 🤞

Every so often I double click on an upstream branch tracked by a local branch that's a few commits behind. In this situation sourcegit prompts me to create a new branch, but it seems pretty rare that the user would actually want this.

Instead it should behave like double clicking on a remote branch in the branch tree - detect that a local tracking branch exists and check that out instead. This PR implements this behavior.

Might be even better to ask the user if they'd also like to fast-forward, but I'm keeping my first PR simple.

@love-linger love-linger self-assigned this Jun 10, 2025
@love-linger love-linger added the enhancement New feature or request label Jun 10, 2025
@love-linger love-linger merged commit 6c04f53 into sourcegit-scm:develop Jun 10, 2025
13 checks passed
@NathanBaulch NathanBaulch deleted the checkout-tracking-branch branch June 10, 2025 09:01
@NathanBaulch
Copy link
Contributor Author

Awesome, thanks for implementing "checkout & fast-forward"!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants