Resolved: fatal: Not a git repository (or any of the parent directories): .git
Resolved: fatal: Not a git repository (or any of the parent directories): .git
I just started using BitBucket as it offer private Git repositories which is something I was looking for and GitHub obviously charges for that. I am going to use my repository for something small and simple not a huge project so justifying the monthly fee was rather hard. Anyway, the instructions for adding a repository in BitBucket read like so:
cd /path/to/my/repo
git remote add origin https://UserName@bitbucket.org/UserName/Project-Name.git
git push -u origin –all # pushes up the repo and its refs for the first time
git push -u origin –tags # pushes up any tags
However, when running the first instruction I am stuck with “fatal: Not a git repository (or any of the parent directories): .git”.
The answer though was simple, I needed to initialize my local repository with an empty Git Repository. Simply execute git init and you’ll get this message:
Initialized empty Git repository in /etc/somefolder/.git/
Now run your remote add origin command again and you’re done!
Love
Can we use Let's Encrypt, the free and open certificate authority?
Hola! gracias por la info, me sirvió el comando sacandole el nombre del server. En mi caso, fue una migración…
Yes 3rd option helped me too. I removed the WC key Values from config file then started working.
I know this is from 2014. But really, thank you!