I went through this [SO OP][1], but wasn't of any help.
I am trying to sort the git branches by creatordate. When I run git branch --sort=creatordate
, the displayed list is fine and makes sense as it displays in ascending order of date(most recent branch displayed at last),
user@home MINGW64 /c/Practice-Projects/react (Testing-Interactive-Mode)
$ git branch --sort=creatordate
master
conditional-rendering
array-destructuring
useState-Hook
useEffect-Hook
useReducer-Hook
Fetching-Data-With-Hooks
Displaying-Data-From-An-API
Handling-Loading-States
Using-Create-React-App-As-Testing-Platform
Testing-Small-Functions-With-Jest
Introducing-React-Testing-Library
* Testing-Interactive-Mode
user@root MINGW64 /c/Practice-Projects/react (Testing-Interactive-Mode)
$ git branch -m Configuring-The-Router
user@root MINGW64 /c/Practice-Projects/react (Configuring-The-Router)
$ git branch --sort=creatordate
master
conditional-rendering
array-destructuring
useState-Hook
useEffect-Hook
useReducer-Hook
Fetching-Data-With-Hooks
Displaying-Data-From-An-API
Handling-Loading-States
Using-Create-React-App-As-Testing-Platform
Testing-Small-Functions-With-Jest
* Configuring-The-Router
Introducing-React-Testing-Library
As can be seen from the above, the sort-order changes(the newly renamed branch Configuring-The-Router
became second latest from the latest in order) after I rename the current branch(Testing-Interactive-Mode
). I am not sure what is the reason behind such a behavior.
UPDATE 1 : START
I have also tried committerdate
, authordate
, yet got same results.
user@home MINGW64 /c/Practice-Projects/react (Testing-Interactive-Mode)
$ git branch --sort=creatordate
master
conditional-rendering
array-destructuring
useState-Hook
useEffect-Hook
useReducer-Hook
Fetching-Data-With-Hooks
Displaying-Data-From-An-API
Handling-Loading-States
Using-Create-React-App-As-Testing-Platform
Testing-Small-Functions-With-Jest
Introducing-React-Testing-Library
* Testing-Interactive-Mode
user@root MINGW64 /c/Practice-Projects/react (Testing-Interactive-Mode)
$ git branch -m Configuring-The-Router
user@root MINGW64 /c/Practice-Projects/react (Configuring-The-Router)
$ git branch --sort=creatordate
master
conditional-rendering
array-destructuring
useState-Hook
useEffect-Hook
useReducer-Hook
Fetching-Data-With-Hooks
Displaying-Data-From-An-API
Handling-Loading-States
Using-Create-React-App-As-Testing-Platform
Testing-Small-Functions-With-Jest
* Configuring-The-Router
Introducing-React-Testing-Library
user@root MINGW64 /c/Practice-Projects/react (Configuring-The-Router)
$ git branch --sort=authordate
master
conditional-rendering
array-destructuring
useState-Hook
useEffect-Hook
useReducer-Hook
Fetching-Data-With-Hooks
Displaying-Data-From-An-API
Handling-Loading-States
Using-Create-React-App-As-Testing-Platform
Testing-Small-Functions-With-Jest
* Configuring-The-Router
Introducing-React-Testing-Library
UPDATE 1 : END