HACKER Q&A
📣 hnthrowaway0328

I feel GitHub lacks some tools, does my thought make sense?


Hi,

I have been using GitHub for some time but have to admit I never went into the depth. However I find it lacking some tools. For example, is it unreasonable to require a feature that sort branches by their status (merged/unmerged) and last commit time so that I can batch delete merged branches older than X months? And is it unreasonable to recover a deleted branch easily?

After spending a lot of time, I managed to find answers to both questions. Neither of which is easy. The first one requires a few lines of bash scripts, which sounds trivial, but needs knowledge of bash scripting, sed and other stuffs. The second one needs the last commit hash, which I'm yet to find out an easy way to batch recover.

Is there any tool that solves these issues? They are common and once for a while one will need them. It might be easy to say "You should learn all", but in reality I don't have time to learn every tool in depth unfortunately.


  👤 gregjor Accepted Answer ✓
You don't have to "learn every tool in depth." You do have to learn how to use the tools you depend on well enough to address your needs.

I have used git/GitHub for years across multiple projects and have never needed to sort branches by status or recover a deleted branch. I try to close branches when done (after merging) and make sure they have descriptive names so I can search for them. You have different requirements, so either you learn to use the tools to meet those requirements or you change your workflow to fit what the tools can easily do.

If you found bash scripts to do what you want then you didn't need to learn bash and sed and so on in depth, you only had to copy/paste the script and maybe change a couple of things.

Learning the tools of the programming trade transfers across projects and jobs. Once you get comfortable with git, bash, sed, etc. you will have those skills for the rest of your career, and most likely those tools will live for a long time because they already have.