I use git branch -a to display branches.
I am assuming the git branch -a is not sorting alphabetically.
Need git branch -a
to sort in numeric like 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
instead of 10, 11, 1, 2, 3, 4, 5, 6, 7, 8, 9
Consider, I don't have the ability to rename branches like prefixing 0
as Part-02
for example as a workaround maybe.
I am open to third party command line git clients as well as a last resort.
On doing git branch -a
Current output:
remotes/origin/Part-10_LoadStateListener
remotes/origin/Part-11_Navigating-to-the-Detail-Screen
remotes/origin/Part-12_Implementing-the-DetailsFragment
remotes/origin/Part-13_Handling-Process-Death
remotes/origin/Part-1_Project-Setup
remotes/origin/Part-2_Layouts-&-Model-Class
remotes/origin/Part-3_Navigation-Component
remotes/origin/Part-4_API-Interface
remotes/origin/Part-5_Dependency-Injection-with-Hilt
remotes/origin/Part-6_PagingSource-&-PagingData
remotes/origin/Part-7_PagingDataAdapter
remotes/origin/Part-8_Header-&-Footer
remotes/origin/Part-9_Search-Functionality
Expected output:
remotes/origin/Part-1_Project-Setup
remotes/origin/Part-2_Layouts-&-Model-Class
remotes/origin/Part-3_Navigation-Component
remotes/origin/Part-4_API-Interface
remotes/origin/Part-5_Dependency-Injection-with-Hilt
remotes/origin/Part-6_PagingSource-&-PagingData
remotes/origin/Part-7_PagingDataAdapter
remotes/origin/Part-8_Header-&-Footer
remotes/origin/Part-9_Search-Functionality
remotes/origin/Part-10_LoadStateListener
remotes/origin/Part-11_Navigating-to-the-Detail-Screen
remotes/origin/Part-12_Implementing-the-DetailsFragment
remotes/origin/Part-13_Handling-Process-Death
I am hoping there is a flag like --numeric-sort
so I could use git branch -a --numeric-sort