Peter Hahn
Peter Hahn

Reputation: 121

How can I show more than the last 3 commits?

git log shows only last 3 commit though i have more-than 50 commit.

git log -10 still shows only last 3 commits.

How can i increase the commit limits?

Upvotes: 2

Views: 8764

Answers (2)

everag
everag

Reputation: 7672

Shallow copies only carry over the commit log depth you configured when you cloned the repository.

If you want to update your shallow copy with a deeper commit history, run:

git fetch --depth=<number-of-commits>

If you want to unshallow this repository and get the full history from the remote, run:

git fetch --unshallow

Note: Unshallowing your repo may take a while and will result in a bigger repository size. Usually teams recommend cloning shallow copies for a reason.

Upvotes: 8

CodeWizard
CodeWizard

Reputation: 142632

git log should display all the commits you have.

check to see if you have any alias which limit your commit.
To check it print out the git aliases you have and check for the log alias.

# print out aliases
git config -l


# The right answer to display last 10 commits is:
git commit -n 10

# display how many commits you have in your repo:
git rev-list --all --count

Upvotes: 1

Related Questions