GitHub and BitBucket Watch

AdampskiB
Badges: 2
Rep:
?
#1
Report Thread starter 5 years ago
#1
I've just installed git on Ubuntu, now I want to work on my repo in BitBucket. I'm a little confused on how to do so. I can't do the following:
Code:
git remote add BitBucketRepo [email protected]:dir/file.git
As it returns the following error:
Code:
fatal: Not a git repository (or any of the parent directories): .git
It clearly is pointing to a git repo, so why is it lying to me?

Also, it is worth noting I am using SSH and I have successfully paired my GitHub account to my computer
0
reply
Push_More_Button
Badges: 3
Rep:
?
#2
Report 5 years ago
#2
You need to initialise your repo.

Code:
cd folder/to/be/repo
git init
Then add your remote

Code:
git add remote origin https://[email protected]/USER/REPO.git
You're then able to push and pull to origin

Code:
touch readme
git add readme
git commit -m "Added readme file"
git push origin master
1
reply
Dez
Badges: 20
Rep:
?
#3
Report 5 years ago
#3
Try:

git clone [email protected]:dir/file.git
0
reply
AdampskiB
Badges: 2
Rep:
?
#4
Report Thread starter 5 years ago
#4
Thanks anyway Dez, but Push_More_Button's solution helped me
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

How did your AQA A-level Psychology Paper 1 go?

Loved the paper - Feeling positive (3)
33.33%
The paper was reasonable (1)
11.11%
Not feeling great about that exam... (1)
11.11%
It was TERRIBLE (4)
44.44%

Watched Threads

View All