Wednesday, January 22, 2014

finding source committed to the wrong Git branch, or, CLI FTW

The other day I added a "test_epoll" file, but now I've lost the branch that contained it.  I have 15 branches locally -- how do I find the file?

Here's one way: for all branches not checked out, show the differences between it and the current branch, specifically looking for files which contain the word "poll".  For each branch, "trace" (echo) the command first, before listing the files different from current branch.


$ git branch | egrep -v '\*' | xargs -t -n1 git diff --stat | egrep poll

git diff --stat feature/ent958
eimport/epollmail.py | 244 ++
eimport/tests/test_epollmail.py | 149 ++
scripts/epollmail | 18 +

Ah -- my stuff was found in branch ent958. Thanks, command line!

Wednesday, January 1, 2014

connect box.com as drive in Linux Mint

1) on the desktop, double-click on Home to fire up the Nemo file manager

2) click File / Connect to Server

3) set type to Secure WebDav (https)
Server: dav.box.com
Folder: /dav

It'll ask for username/password.

Troubleshooting


Q: tries to connect to server, get perpetual spinner
A: Kill the WebDAV daemon and restart it:
killall gvfsd-dav ; nemo