[git] fatal: your current branch 'main' does not have any commits yet


% git log
fatal: your current branch 'main' does not have any commits yet

If you are within your git local directory and you run git log command and you get the above error, the reason is, this is a new branch and you have not committed anything yet to generate git commit logs.

✏️ This is rather a warning and not an error :)

Note: Even if you add some files to the staging area, you will see this message, until you commit something.

fatal-git-does-not-have-any-commits-yet.

Top Hashtags:

Advertisements

Advertisements




Advertisements