Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

clone single file from bitbucket private repo

kondaiah1
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 30, 2019

I have 100 files in bitbucket repo. But when i try to clone the single file using ssh  i am cloning the entire repo.

Can anyone suggest me how to clone a single file from repo using ssh.

 

 

 

1 answer

0 votes
DPKJ
Community Champion
September 30, 2019

@kondaiah1you need to understand GIT before you do clone operation in BitBucket.

In repository you can't clone single file, clone operation is for whole repository. All other operation like, push, pull, and merge are also for repository.

Albeit, you can download single file from BitBucket. For this,

Go to file which you want download, and do open it in raw format and save it using your browser.

Screenshot 2019-09-30 at 4.39.17 PM.png

Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 30, 2019

Hello @kondaiah1,

In addition to what @DPKJ said: there's a way to clone not the whole repository but only the last N commits or commits since some date – this is called shallow clone. So you can only fetch the files in their state at the last commit.

Hope this helps.

Cheers,
Daniil

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events