Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have permission to ask a question, You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please type your username.

Please type your E-Mail.

Please choose an appropriate title for the post.

Please choose the appropriate section so your post can be easily searched.

Please choose suitable Keywords Ex: post, video.

Browse

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Logo Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Logo

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Navigation

  • Home
  • About Us
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • About Us
  • Contact Us
Home/ Questions/Q 6997

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Latest Questions

Author
  • 60k
Author
Asked: November 27, 20242024-11-27T11:44:08+00:00 2024-11-27T11:44:08+00:00

Delete git branches in batches

  • 60k

🤔 Delete git branches in batches

npm npm version NPM

In daily development, we create a git branch function every time we make a requirement. Over time, many local and online branches will be accumulated. Then it is particularly important to have a tool to delete git branches in batches at this time. GBKILL is a tool created to solve this need, allowing you to delete git branches more efficiently

Image description

This tool will list the git branches in the projects, and then you can select in batches the git branches that need to be deleted.

🤔 Install

Actually you don't need to install it to use it! Just use the following command:

$ npx gbkill 
Enter fullscreen mode Exit fullscreen mode

Or you can install it:

$ npm i -g gbkill 
Enter fullscreen mode Exit fullscreen mode

šŸ•ļø Usage

Enter gbkill in your terminal** (currently not compatible with Git in Windows terminal)**. gbkill will execute the git command to scan the git branches under your current project s and display them in the lists

Key Description
Space Press the spacebar to execute the merged branch deletion (recommendation: to prevent accidental deletion)
Tab Press the Tab to execute `merged
RightArrow Press {% raw %}-> to execute `Open
↓ Press {% raw %}↓ to select branch
↑ Press ↑ to select branch

Hint

  1. The merge listed on the gbkill interface displays yes or No which is judged by git branch --merged <name>. You can specify the merged branch name by executing gbkill --merged <name>

  2. When the merge status in gbkill is yes, but NO_FORCE...fully merged appears when you delete the branch. Reason: The code of this branch is not merged into the currently focused branch. Requires forced deletion

  3. When executing gbkill --sync, the remote branch of the target branch will be deleted first and then the local branch

šŸ–ļø Parameter

Configurable parameters of gbkill. Some configuration parameters will be cached and shared globally in the /user home directory/.gbkill file.

Argument Description Cache
–force Forcibly delete a branch, equivalent to git branch -D <name> (Caution: local commit changes will be deleted) No
–sync Whether to delete remote branches synchronously No
–merged <name> Specify the branch name used to determine whether a branch has been merged (git branch –merged <name>) Yes
–lock <names..> Locked some branches will be hidden in the list, and the data will be accumulated instead of replaced (Prevent accidental deletion, protect some branches) Yes
–unlock <names..> Unlock a branch locked by --lock Yes

šŸļø State of Git branch

Description corresponds to branch status.

Status Description Color
NONE The branch is in a normal state
DELETING Branch is being deleted šŸŒ
DELETED Branch deleted 🟢
FAILED Fail to delete branch šŸ”“
NO_MERGED The branch was not merged into name branch (--merged <name>) 🟣
NO_FORCE This branch needs to be forcibly deleted git branch -D name(--force) 🟔
NO_SYNC Fail to delete remote branches synchronously 🟠

šŸžļø Known issues

āš ļø Git for Windows Terminal is currently not supported, and the tool is limited to ink. We will look for alternatives later. Please use CMD, Vscode terminal's Git... terminal

⛺ Other

  1. This tool will be continuously optimized. If you have better ā€˜interactive behavior’ or ā€˜feature requests’, you can submit a ā€˜pr’ or ā€˜issue’ to me
  2. Thank you for using this tool and looking forward to your [issue](https://github.com/AKclown/gbkill/issues) or [PR](https://github.com/AKclown/gbkill/pulls)

clinodetypescriptwebdev
  • 0 0 Answers
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question

Stats

  • Questions 4k
  • Answers 0
  • Best Answers 0
  • Users 2k
  • Popular
  • Answers
  • Author

    Insights into Forms in Flask

    • 0 Answers
  • Author

    Kick Start Your Next Project With Holo Theme

    • 0 Answers
  • Author

    Refactoring for Efficiency: Tackling Performance Issues in Data-Heavy Pages

    • 0 Answers

Top Members

Samantha Carter

Samantha Carter

  • 0 Questions
  • 20 Points
Begginer
Ella Lewis

Ella Lewis

  • 0 Questions
  • 20 Points
Begginer
Isaac Anderson

Isaac Anderson

  • 0 Questions
  • 20 Points
Begginer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help

Footer

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise

Querify Question Shop: Explore, ask, and connect. Join our vibrant Q&A community today!

About Us

  • About Us
  • Contact Us
  • All Users

Legal Stuff

  • Terms of Use
  • Privacy Policy
  • Cookie Policy

Help

  • Knowledge Base
  • Support

Follow

© 2022 Querify Question. All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.