Ande Caleb
Ande Caleb

Reputation: 1204

how to use Bitbucket

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://[email protected]/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.

Upvotes: 0

Views: 1087

Answers (2)

bytedev
bytedev

Reputation: 9129

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

Upvotes: 1

Anastasios Moraitis
Anastasios Moraitis

Reputation: 388

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

Upvotes: 0

Related Questions