r3bl-org/r3bl-open-core

[giti] `giti branch new`: Create a user experience for creating a new branch

Closed this issue · 1 comments

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. For example to delete one or more branches in your repo run giti branch delete.

Private giti design document

Create a giti branch new user experience

giti branch new creates a new branch and automatically switches to this branch.

We have 2 use cases to consider. This is how the user experience should look like:

1. In case user didn't type branch name
If user presses types giti branch new and then presses enter, ask them to type new branch name. Use readline for this.

> giti branch new

Please type branch name you want to create after "new". 
For example `giti branch new my-new-branch`

2. User typed branch name

> giti branch new NadiaIdris/new-branch

You created and switched to new branch:
✅ NadiaIdris/new-branch

Closed in PR #306