list/checkout recently used branches
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 18.1k
- Forks
- 1.2k
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 1
Description
Hi. I have a little script that parse git reflog to look for recently used branches.
It's similar to git checkout @{-n} but more user-friendly.
For example,
(nao) mgaitan@morochita:~/nao$ git recent-branches
1 - feature/PSO-20131-refactor-to-avoid-package-s-interdependency
2 - feature/PSO-20723-include-ut_utils-only-in-development-installations
3 - feature/PSO-20130-move-model-s-related-tests
4 - develop
5 - develop_fixed
6 - master
7 - 48b39f6e31d0181af828fe2b660fc109d4aeb9d4
8 - master_fixed
9 - feature/PSO-20130-move-model-s-related-tests__
(nao) mgaitan@morochita:~/nao$ git recent-branches 2
Switched to branch 'feature/PSO-20723-include-ut_utils-only-in-development-installations'
Your branch is up-to-date with 'origin/feature/PSO-20723-include-ut_utils-only-in-development-installations'.
Here is my implementation, in python
https://gist.github.com/mgaitan/ba1e4e252b90a7fd4a4eb9e1742e94fb
Could it be useful in this package? I could rewrite it in bash, if it was needed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing git-extras command structure and the linked Python implementation, then inspect how git reflog and checkout are invoked. The finished command should list recently used branches and accept a numeric selection that checks out the corresponding entry, matching the examples in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, python, shell
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100