odb

odb

Opening dirty files from a branch

Showing:

Popularity

Downloads/wk

4

GitHub Stars

6

Maintenance

Last Commit

7yrs ago

Contributors

1

Package

Dependencies

0

License

BSD-2-Clause

Type Definitions

Tree-Shakeable

No?

Categories

Readme

open-dirty dirtydirty odb

Opening dirty files from a branch.


🎤💻
odbI want to checkout the branch I'm working on then open all the files I've been working on (aka 'dirty'), in that branch, in my text editor. I don't want to fuzzy find them or search through the tree for them or open them once and leave the window open until the PR is merged... No, no.

What ODB does

It runs git diff --name-only origin/master... the same as you could do on the command line. This gets a list of the files that include changes not on master. ODB then creates another command for opening the text editor with each of those files. It then runs that command.

Dirty files are files with changes you've committed already -- different than unstaged, uncommitted changes. ODB won't open files with unstaged changes. You should commit more!

How to Use

You'll need to have installed Node.js to run ODB and of course Git.

Install

$ npm install -g odb

Use

The default editor is Sublime. You can change it Atom:

$ od --editor atom

Do the same to set it back to Sublime, but type 'subl' (instead of the full name). I can't say how it will work with other editors...

To use, after you cd into the directory for the repo you're working on (and if needed, checkout the branch you want), run ODB:

$ cd <RepoDirectory>
$ od

The dirty files will open in your text editor :)

It uses the default branch to compare to as master. To change the branch:

$ od gh
# short for gh-pages
$ od <fullbranchname>
# for other branches

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100