Skip to content
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

[Feature-Request]: Add default or main Command to Switch Back to Main/Master Branch #55

Open
Anselmoo opened this issue Sep 22, 2024 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Anselmoo
Copy link

Introduction

Adding a new command, default or main, would be beneficial to the gitnow tool that allows users to quickly switch back to the main or master branch of their repository. This command would streamline the workflow for users who frequently switch between feature branches and the main branch.

Suggested Implementation

The new command should:

  1. Detect the default branch name (either main or master).
  2. Switch to the detected default branch.

Example Usage

Command:

 default

or:

 main

Instead of:

git checkout main
# or
git checkout master

This feature would enhance the usability of gitnow by providing a quick and intuitive way to switch back to the main branch, aligning with common git workflows.

@joseluisq
Copy link
Owner

It is no bad idea. But for now, I think move can achieve this in some form via move master with the possibility to go back using move - and since move has completions, it should reduce typing. See #50

@joseluisq joseluisq added enhancement New feature or request help wanted Extra attention is needed labels Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants