others-how to solve Not a git repository (or any of the parent directories): .git problem ?
Problem
When we do git pull command like this:
[root@bswen-k8s-app5 ~]# git pull [email protected]:bswen/argocd-example-apps.git
we get this :
fatal: Not a git repository (or any of the parent directories): .git
The core error is : fatal: Not a git repository (or any of the parent directories): .git
Why do this error happen? The git repository does exist ,and the url is correct, I promise!!!
Environment
- git version 2.21.1 (Apple Git-122.3)
Reason
You have not clone the git repository yet!
You should clone it at first, and then pull it if something changes.
Solution
First, clone it:
[root@bswen-k8s-app5 ~]# git clone [email protected]:bswen/argocd-example-apps.git
Then pull the changes in the repo:
[root@bswen-k8s-app5 ~]# cd argocd-example-apps
[root@bswen-k8s-app5 argocd-example-apps] git pull
It works!