When I push my local repository to remote server, I met with "fatal: does not appear to be a git repository" error. So I searched the Internet, and found two possible solution:
Solution 1: fatal: does not appear to be a git repository
Solution 2: git 'origin' does not appear to be a git repository
Solution 1 basically give some idea on how to write the URL correctly when using SSH protocol from your local repository while Solution 2 talks about the remote repository server.
I have used either of the solution. If I use the following git command to add a remote repository I will not have any problems:
git remote add Name ssh://XX@git2.company.com/export/git/Name
However, if I use the following command to add a remote repository (git remote rm Name first):
git remote add Name ssh://XX@git2.company.com/export/git/Name.git
I will have errors "fatal: Name.git does not appear to be a git repository" when the local repository is pushed to the remote server. Any ideas? Thanks.