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

git delete-current-branch #866

Open
btd1337 opened this issue Aug 15, 2020 · 0 comments
Open

git delete-current-branch #866

btd1337 opened this issue Aug 15, 2020 · 0 comments

Comments

@btd1337
Copy link

btd1337 commented Aug 15, 2020

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant