Support I create multiple branches (aaa, bbb, ccc) from a commit. Then, I create a new branch (ffffd) from one of the branch (bbb) and a make a commit on it.
Then I p
add those two functions to your .bashrc:
function newbranch() {
history_file=".git/branching_history"
from=`git rev-parse --abbrev-ref HEAD`
to=$1
git checkout -b $1 > /dev/null 2>&1
DATE=`date '+%Y-%m-%d %H:%M:%S'`
echo "$DATE: from $from created branch $1" >> $history_file
}
function branchinghistory() {
cat .git/branching_history
}
then when you create a new branch, don't run git checkout -b mybranch
but do:
newbranch mybranch
this will store your branching log in .git/branching_history
file. You can check the log with:
branchinghistory
the output should be:
2020-04-22 23:59:06: from master created branch mybranch