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 branch delete: Handle user deleting current branch which is main development branch #273

Open
NadiaIdris opened this issue Dec 12, 2023 · 0 comments

Comments

@NadiaIdris
Copy link
Contributor

NadiaIdris commented Dec 12, 2023

Prerequisites

Install and run giti

  1. Move to ./tuify folder in your terminal
  2. Run nu run.nu install-giti to install giti locally to ~/.cargo/bin
  3. Run giti from anywhere on your system
  4. To delete one or more branches in your repo run giti branch delete

Private giti design document

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`
@NadiaIdris NadiaIdris changed the title [tuify][giti] Account for user deleting main development branch use case [tuify][giti] Account for user deleting current branch which is main development branch Dec 12, 2023
@NadiaIdris NadiaIdris changed the title [tuify][giti] Account for user deleting current branch which is main development branch [tuify][giti] giti branch delete: Handle user deleting current branch which is main development branch Dec 13, 2023
@nazmulidris nazmulidris changed the title [tuify][giti] giti branch delete: Handle user deleting current branch which is main development branch [giti] giti branch delete: Handle user deleting current branch which is main development branch Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant