I have a local development PC and a remote Windows Server machine. Git is installed on both. I already have an Angular project (angular_project_old
) with a Git repository, and I am successfully able to pull/push the changes that I do on my local PC to the remote Git server. However, I am facing issues when setting up a new project.
I have created a new Angular project on my development PC called (angular_project_new
). In this, I have initialized git repository:
E:angular_project_new > git init
E:angular_project_new > git add .
E:angular_project_new > git commit
Then I created a bare repository by remote-logging on my server (10.1.1.1):
D:projects > git init --bare angular_project_new.git
Then I set the remote origin URL to a URL of the server similar to my old/working angular project.
git remote add origin //10.1.1.1/projects/angular_project_new.git
Now it lists the origin URL correctly but when I try to push the code from my development PC, it returns error.
E:angular_project_new > git push -u origin master
fatal: '10.1.1.1/projects/angular_project_new.git' does not appear to be a git repository
fatal: Could not read from remote repository
I don’t understand the reason for this error when an identical remote URL is working for my old project.
E:angular_project_old > git remote -v
origin //10.10.6.42/projects/angular_project_old.git (fetch)
origin //10.10.6.42/projects/angular_project_old.git (push)
This works fine.
However, for my new project:
E:angular_project_new > git remote -v
origin //10.10.6.42/projects/angular_project_new.git (fetch)
origin //10.10.6.42/projects/angular_project_new.git (push)
It does not work! How may I resolve this issue?