[giti] `giti branch delete`: Handle user deleting current branch which is main development branch
Opened this issue · 0 comments
NadiaIdris commented
Prerequisites
Install and run giti
- Move to
./tuify
folder in your terminal - Run
nu run.nu install-giti
to installgiti
locally to~/.cargo/bin
- Run
giti
from anywhere on your system - To delete one or more branches in your repo run
giti branch delete
Task
- User's current branch is main development branch and user is deleting it.
- Before displaying a success message showing all local branches that got deleted, show another Tuify component asking which branch to switch to since user is deleting main/master/develop branch (show a list of branches that are left)
> giti branch delete
Space: select or unselect branches
Return: confirm selection
Esc or Ctrl+C: exit program
Please select branches you want to delete
☐ aaronsmith/branch-1
› ✔ Current: main
☐ NadiaIdris/branch-2
☐ NadiaIdris/branch-3
☐ NadiaIdris/branch-4
-----------------------------------------------------
(next step)
Space: select or unselect branches
Return: confirm selection
Esc, Ctrl+C: exit program
You are deleting "main" branch. Please choose branch to switch to:
◉ aaronsmith/branch-1
◌ NadiaIdris/branch-2
◌ NadiaIdris/branch-3
◌ NadiaIdris/branch-4
-----------------------------------------------------
(next step)
Space: select or unselect branches
Return: confirm selection
Esc, Ctrl+C: exit program
✅ `main` deleted
Current branch switched to `aaronsmith/branch-1`