Skip to content

Custom remote branch path support -r, --remote-branch option for move command #58

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
Apr 19, 2025

Conversation

joseluisq
Copy link
Owner

@joseluisq joseluisq commented Apr 18, 2025

This PR adds support for using a custom remote branch path like <origin>/<master> when wanting to switch to a specific remote branch. It makes it easier to switch between multiple remote branches apart from the current one (e.g., origin).

The -r, --remote-branch option requires the -u, --upstream to be provided together.

move -h
#      -r --remote-branch      Use a custom remote branch path like '<origin>/<master>' when wanting to switch. It requires the '-u, --upstream' option.

Examples

For switching to specific remote branches (not only on the current one), use these variants:

# Using it with `-u, --upstream`
move --upstream --remote-branch my-remote/my-branch
move -u -r my-remote/some/branch
move -ur my-remote/my-branch

# Using it with `-n, --no-apply-stash`
move -nur my-remote/my-branch
move -unr my-remote/some/branch

For switching to remote branches on the current remote only (e.g., origin), use these variants:

move --upstream my-branch
move -u my-branch

It adds support for using a custom remote branch path like
`<origin>/<master>` when wanting to switch to a specific remote
branch. It makes it easier to switch between multiple remote branches
apart from the current one (e.g., `origin`).

The `-r, --remote-branch` option requires the `-u, --upstream` to be
provided together.

```
move --upstream --remote-branch my-remote/my-branch
move -u -r my-remote/some/branch
move -ur my-remote/my-branch
```
@joseluisq joseluisq added the enhancement New feature or request label Apr 19, 2025
@joseluisq joseluisq changed the title Custom upstream --remote option for move command Custom remote branch path support -r --remote-branch option for move command Apr 19, 2025
@joseluisq joseluisq changed the title Custom remote branch path support -r --remote-branch option for move command Custom remote branch path support -r, --remote-branch option for move command Apr 19, 2025
@joseluisq joseluisq marked this pull request as ready for review April 19, 2025 15:00
@joseluisq joseluisq force-pushed the custom-upstream-remote branch from 96f3c48 to 6de8625 Compare April 19, 2025 15:02
@joseluisq joseluisq added this to the 2.7.0 milestone Apr 19, 2025
@joseluisq joseluisq merged commit dcf2a42 into master Apr 19, 2025
4 checks passed
@joseluisq joseluisq deleted the custom-upstream-remote branch April 19, 2025 15:15
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.

1 participant