Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jeremypw
Copy link
Collaborator

@jeremypw jeremypw commented Jan 23, 2025

Fixes #1156

  • Extend "Branch" submenu to include Remote branches not yet fetched locally
  • Allow remote branches to be fetched to new matching and linked local branch

Note that the overwriting part of this issue is down to using Ggit.CheckoutStategy.FORCE when checking out the other branch. Ggit.CheckoutStrategy.SAFE was tried but resulted in unwanted staged files representing the reverse of the changes made to the other branch (but these are not visible in Code). There are many other Ggit.CheckoutStrategy flags available but it is not clear which if any of these would be better.

The solution adopted here is to advise the user to back out and resolve the uncommitted changes before switching branch but to offer to overwrite the changes anyway.

Screenshot from 2025-01-29 12-13-47

@jeremypw jeremypw changed the title Show remote branches in Project context menu Confirm overwrite of uncommitted changes on checkout; Include remote branches Jan 25, 2025
@jeremypw jeremypw marked this pull request as ready for review January 25, 2025 19:06
@jeremypw jeremypw changed the title Confirm overwrite of uncommitted changes on checkout; Include remote branches Implement checkout of remote branches Jan 29, 2025
@jeremypw jeremypw marked this pull request as draft February 3, 2025 12:27
@jeremypw
Copy link
Collaborator Author

jeremypw commented Feb 3, 2025

Converting to draft after possible problem with setting upstream.

Jeremy Wootten added 2 commits February 3, 2025 12:36
# Conflicts fixed:
#	src/FolderManager/ProjectFolderItem.vala
#	src/Services/MonitoredRepository.vala
@jeremypw jeremypw marked this pull request as ready for review February 3, 2025 14:38
@jeremypw jeremypw merged commit 3481195 into master Apr 3, 2025
6 checks passed
@jeremypw jeremypw deleted the jeremypw/show-remote-branches branch April 3, 2025 09:17
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.

ProjectFolder menu: "Branch" option does not show remote branches

3 participants