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

Add -d and -D options to git up command #98

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jadercorrea
Copy link

When we merge changes and remove the remote branch, we need to manually remove the local branch. But if it is someone else that ships your code, you probably will need to remember that. Sometimes we simple try something in a exploratory branch, committing the changes for others to see some other option or maybe only to test a concept, in any of this, there's code on your branch that you maybe don't want to keep.

This options serve that purpose: offer a tool so you don't need to remember stuff like that.

How it works

It gets all your local branches that don't have any correspondent remote branch and applies the option you passed to git up.

Just like git branch -d and -D commands work, -d option removes branches only if they don't have any unmerged commits.

-D removes the branch even if there is changes you didn't merge on master yet: use it only if you know what you are doing!

Your current branch will be preserved, even if you didn't push it yet. It will look like this:
screenshot 2015-07-20 22 11 14

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

Successfully merging this pull request may close these issues.

1 participant