Forums

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

how to create sub folders under a repository?

Yit Yeng
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!
October 4, 2018

how to create multiple sub folders under a repository? can treat branch as folder? i am having difficulty in creating folders

1 answer

1 accepted

0 votes
Answer accepted
Yogesh Mude
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
October 4, 2018

HI @Yit Yeng

Welcome to the community!

You can create the subfolder/directory using mkdir command.

But the Git will not track the empty directory so to track the directory within the repo you need to add the files into it.

Yit Yeng
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!
October 14, 2018

@Yogesh Mudemany thank for the reply.
I think it would be easier if directly create folder at our local checked out folder and follow by commit to the bitbucket. currently I am using source tree as a free git to check in those source code.

Edward Prochak
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!
February 6, 2026

I am having similar issue. Quick context:

Using SourceTree

Repo contains a C++ tool and a related Python tool. Repo works fine. C++ app builds fine and changes have been made multiple times.

Now I completed changes to the Python scripts and I added a subfolder (TestDir) for some test files. The test files are a text data file (.csv), a binary data file (.ecg), and a text log file (.log). The folder is not recognized, and the files are not recognized. I'm trying to stage my changes, but I need the test files. in the release.

I have even copied the files to the root folder. They are not recognized there either.

I did get it to recognize the folder by adding a dummy.py file. But I do not want to commit that to make a folder that won't accept the test files.

Not clear how I can get past this. 

Update:

Trying to add the files on BitBucket. I managed to add the csv file with TestDir in its pathname. So partial success. Bitbucket does not seem to have an option for a binary file when adding a new file. Unable to add a file that does not have a file type (extension) that is not in the list.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events