git delete-current-branch
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 18.1k
- Forks
- 1.2k
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 1
Description
Hi @tj,
When your team do Merge Requests in web, like in Gitlab, your remote branch is deleted, but local current branch isn't.
To avoid user to go into develop branch, do a git pull and then execute git delete-branch branch-name, it would be interesting an method like this:
Command
git delete-current-branch
Instructions
branch=$(git branch --show-current)
git checkout develop
git pull
git branch -d $branch
What do you think about this?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the proposed git delete-current-branch command and review the shell sequence in the issue, especially how it identifies the current branch and uses develop. Done means the new command is available in git-extras and its behavior matches the documented instructions without leaving the user on the deleted branch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, shell
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100