Saturday, February 26, 2022

Solution for Git Error : fatal: Not a valid object name: 'master'.

 fatal: Not a valid object name: 'master'. 


We are getting this error due to master branch is not present . 

so we have to create empty master branch :


Solutions:

[root@oracle19c production]# git branch dev

fatal: Not a valid object name: 'master'.

[root@oracle19c production]#

[root@oracle19c production]#

[root@oracle19c production]# git commit --allow-empty -m "anurag"

[master (root-commit) 47e4721] anurag

[root@oracle19c production]#

[root@oracle19c production]# ls -la

total 0

drwxr-xr-x. 1 root root   8 Feb 26 17:45 .

dr-xr-x---. 1 root root 230 Feb 26 17:45 ..

drwxr-xr-x. 1 root root 134 Feb 26 17:48 .git

[root@oracle19c production]#

[root@oracle19c production]#

[root@oracle19c production]# git branch dev

[root@oracle19c production]#

[root@oracle19c production]#

No comments:

Post a Comment

About the Author : Anurag Pandey | Database cloud Architect | Oracle | SQL Server | PostgreSQL | AI and Data Platform Enthusiast

Anurag Pandey is a Database Architect with expertise in Oracle, PostgreSQL, SQL Server, Linux, and enterprise database platforms and specializes in database architecture, performance tuning, high availability, disaster recovery, cloud modernization, and operational excellence. With extensive experience in enterprise-scale environments, Anurag is passionate about leveraging AI, automation, and modern data platforms to improve reliability, scalability, and business outcomes. He actively contributes to technical communities through knowledge sharing, architecture guidance, and thought leadership in database and data engineering domains.

Follow more articles at

Visit Blog

Oracle Database Deep Health Check Checklist

Oracle Database Deep Health Check Checklist Recommended assessment levels Level Purpose Typical scope L1 Operational health Availability, sp...