简体   繁体   中英

How can I see commit pushed in different branches together?

I want to list down last commits which were made in different branches together. ie. I want to see the branch name, even if I've forgotten in some cases.

Scenario => Let's take - I was working in 3 different branches in a single day & I wanted to see what last commits I have made in all those 3 branches together ie. - Not by mentioning any branch name.

I can get all commits pushed in a particular branch with this command -

git log mybranchName

Is there any provision which can give me result like -

Branch login => commit: Added form design.

Branch register => commit: Registration module completed.

Branch master => commit: Release v1.0.0

Note - Not just 3 branches, It should be a flag to get how many of the last branches I wanted to list down. The only purpose is to list down the branches in which I am working on without jotting down it.

Also happy if any flag can help me to achieve this. 🙂

You might want to give a look at this question.

One good command to see all branches at the same time in a nice way is the following:

git log --graph --oneline --decorate --all

To remember it, see this answer .

如果您使用简单的图形界面,如gitkgitg,您可以传递--all选项,它将列出所有提交的分支:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM