0

i am comfortable using Github to but i am trying to migrate to bitbucket since it supports private repositories by default.

My reason is because to make a repository private in Github, you have to pay some fee, but bitbucket.org provides it for free. I just created an empty repository named testproject, and i'm trying to push my files from my system to the repository online,

this is what i am trying to do ..

git clone https://ande_EAD@bitbucket.org/ande_proj/testproject.git

cd testproject
echo "# My project's README" >> README.md
git add README.md
git commit -m "Initial commit"
git push -u origin master

all my git-commands are giving this error ::

"fatal: Not a git repository (or any of the parent directories): .git" 

please can someone assist me, whats the proper way of adding content to your repository on bitbucket. and note :: i prefer using command line than any software except otherwise.

if this works then i can successfully push other projects online, and invite the teams to join me.

Ande Caleb
  • 1,163
  • 1
  • 14
  • 35

2 Answers2

1

Are you sure you are in the correct folder?

See this answer:

fatal: Not a git repository (or any of the parent directories): .git

When I use Bitbucket I tend to do things the other way round, i.e.:

  • Create my git repo locally using git init
  • Add and commit any files
  • Go into bitbucket and create a new repository
  • Then switch back to git and run:

git remote add origin https://<user_name>@bitbucket.org/<user_name>/<repo_name>.git

git push -u origin master

Community
  • 1
  • 1
bytedev
  • 8,252
  • 4
  • 48
  • 56
  • @Andaeiii if you do it the other way round local repo -> BitBucket it will def work, I do it all the time :-) – bytedev Apr 12 '17 at 15:29
0

You can use SourceTree destop app to handle your repos in bitbucket and other services