Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the easiest/fastest way to find out when a git branch was created?

Tags:

git

branch

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?

like image 690
innaM Avatar asked Nov 27 '09 12:11

innaM


People also ask

How can I tell when a branch was created in GitHub?

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.

How do you find out from which branch a branch was created?

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.

How can I tell when a branch was created in Bitbucket?

You can use the git log --reverse to get the first commit and print its date.


1 Answers

git show $(git merge-base master your-branch)

will show the commit where your branch branched off master

like image 59
knittl Avatar answered Sep 23 '22 06:09

knittl