joseluisq / joseluisq/gitnow

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

Open
#55 1 comment 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
Shell
Stars
490
Forks
27
PR merge metrics
No merged PRs in 30d

Description

### 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:**
```sh
default
```

or:

```sh
main
```

**Instead of:**
```sh
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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.