I was trying to find out when a certain feature branch in one of my repositories was created and I found that surprisingly hard. I ended up using a combination of git show-branch
and git log
.
Is there any easier way to find this little piece of information quickly and efficiently from the command line?
Click History. On the History tab, click the commit you'd like to review. If there are multiple files in the commit, click on an individual file to see the changes made to that file in that commit.
You can use git branch --contains to list all the branches descended from the tip of develop , then use grep to make sure feature is among them. If it is among them, it will print " feature" to standard output and have a return code of 0.
You can use the git log --reverse to get the first commit and print its date.
git show $(git merge-base master your-branch)
will show the commit where your branch branched off master
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With