git-up icon indicating copy to clipboard operation
git-up copied to clipboard

Add -d and -D options to git up command

Open jadercorrea opened this issue 10 years ago • 0 comments

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

jadercorrea avatar Jul 21 '15 01:07 jadercorrea