I have one git repository, there are many branches many commits, I want to find the latest 10 commits, how to do this , thanks!
相关问题
- How to add working directory to deployment in GitH
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- Emacs shell: save commit message
- Can I organize Git submodules in a flat hierarchy?
相关文章
- 请教Git如何克隆本地库?
- java开发bug问题:GitHub授权登录无法获取授权账号信息?
- Is there a Github markdown language identifier for
- “no implicit conversion of Integer into String” er
- GitHub:Enterprise post-receive hook
- Git Clone Fails: Server Certificate Verification F
- SSIS solution on GIT?
- Is there a version control system abstraction for
For last 10 commits in all branches, you can do:
See here for more info if you need to customize further: http://linux.die.net/man/1/git-log
If you want commits for all branches you need the --all argument, limit git log to ten with -10 and use --date-order to tell git log to sort the commits with respect to date.
To find specific number of commits you can use the
-n
option :As, @honk pointed out,
-n 5
and-5
are equivalent.To find commits on other branch, without checking out the other branch :
So, if you are at develop branch and wish to get last 10 commits of master(oneline), you could do:
To view commits of all branches there's a
--all
argument.Try this
git log --graph
& you will get the commits in the order latest to old along withEDIT:
or you can use:
git log --pretty=oneline --graph
which gives all the commits & branch topology