ghq icon indicating copy to clipboard operation
ghq copied to clipboard

(Feature request) Check and Clean up

Open simenandre opened this issue 4 years ago • 2 comments

Hello!

Thank you for a great project. I recently built a tool to clean up my repository folder (https://github.com/cobraz/organize-repo-folder) and posted it to Reddit for some feedback. A great guy by the name of PaulCapestany tipped me about ghq. This tool is so much better than my organizational tool, so I totally replaced mine with yours.

However, when I built organize-repo-folder, one of the features that I meant to add was a way to analyze when I worked on the project last, if there were any uncommitted changes and if everything was pushed. This way I could determine automatically if I could remove the repositories that I no longer worked on. I would love to see this feature added to ghq.

I think it could be added as a few commands, e.g. ghq check. This command would go through all repositories, check if they have uncommitted changes/stashes/untracked files. and ghq cleanup --since 60d would first do the same as ghq check, and also check if there are any files updated for more than 60 days ago if there is no result on ghq check too, it would delete them. Of course with some are you sure (y/N) thing as well (unless --force is appended).

What do you think? I would love to contribute if you would accept a pull request with this :)

re #299

simenandre avatar Nov 28 '20 19:11 simenandre

Came here to ask for essentially the same feature. For me, the most important thing would be to find all repos that have a dirty working directory, but what @cobraz suggests is even better! Please make it happen!

lorenzleutgeb avatar Apr 12 '21 20:04 lorenzleutgeb

I would love to help out! /cc @Songmu @motemen

simenandre avatar May 04 '21 09:05 simenandre