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

[giti] giti issue [list, develop, review, merge], giti branch rename #374

Open
nazmulidris opened this issue Dec 6, 2024 · 0 comments
Open

Comments

@nazmulidris
Copy link
Member

nazmulidris commented Dec 6, 2024

Use case for giti branch rename

The scenario is that I have a branch that I'm working on locally. It also has a remote tracking branch. This happens when I have an auto generated (by gh) branch name that is way too long. The name is so long that it doesn't allow any other information to be displayed in my prompt (customized using starship at the moment).

  1. I want to rename this branch locally and have this name reflected remotely as well.
  2. I would also like the deprecated remote branch to be deleted as well.

Currently this takes a lot of commands to execute. It would be nice to have this done in a single command.

Use case for giti issue [list, develop, review, merge]

Currently I use the following:

  • gh issue develop 371 --checkout -n some-branch-name-that-is-not-long
  • gh pr create --fill
  • gh pr merge

These are tedious and cumbersome to use.

  • I have to remember the issue number and type it exactly.
  • The auto generated branch names are way too long. And it is hard to configured them or rename them after they've been created.
  • I have to type so many different commands to be able to work in the same "flow".

I would like this to be simplified using `giti branch [list, develop, review, merge]:

  • giti branch list - This can list all my issues. Also in the other 3 commands if I need access to my issues then they should be prepopulated and I should be able to select them from a UI list.
  • giti branch develop - This should prompt me to pick an issue that I'd like to work on. Then it should create a local branch for that issue, and a remote tracking branch too. I should be able to rename this branch using giti branch rename and it should handle local and remote branches (along with deleting the deprecated remote branch).
  • giti branch review - This should create a PR.
  • giti branch merge - This should merge the PR and delete the local and remote branch, switch to main, and then do a pull to get the changes that were just merged to main from the deleted branch.

All these commands will require the gh CLI app, instead of directly accessing the GH API and dealing with tokens. Users will be be expected to have gh installed (via brew) and gh auth login to be complete in order to use these commands.

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

No branches or pull requests

1 participant