How to solve the issue of git push fatal origin?

418    Asked by DanPeters in Devops , Asked on Jul 25, 2023

Everything was doing well, since I could:

Git add. All the files from the local repository.

Git commit-m “message here” to put messages to the commits.

Gitpush origin master to upload the files to github.

git push heroku master to upload the files to Heroku.


But, I made a fresh local branch known as add-calendar-structure for the following step of the app development,

But inspite of trying, I could not fetch the first code that was madeprior to making the new branch from the master branch to the local repository.


Hence I decided to remove the files from the local repository and git clone the master branch from gitHub. I fetched my files but I am unable to push the remote repository. I attempt to run git push origin add-calendar-model or git-push origin master, the error appears: fatal: “origin” i not a git repository.

Fatal: Could not read from remote repositpry. I am uncomfortable with Git and GitHub, and I am looking forward to resolve the error.

The error message “fatal origin does not appear to be a git repository” happens because the remote is excluded. You can try the below-mentioned command.


Git remote   -v
Git remote remove
Then add
Git remote add
Then you can
Git push origin master

The fatal origin does not appear to be a git repository message is seen while attempting to push code to a remote Git repository without informing Git the real position of the remote repository. If you wish to fix the error, you can utilize the git remote add command to include a remote to the project. DevOps certification training provided at JanBask offers an extensive training on the core concepts of devOps from the comfort of your place without the need to travel to the physical location. The company provides training through exciting e-tools that makes the learning fun and simple.


Your Answer

Interviews

Parent Categories