Files in the working tree - doesn't show all the directories in the path

I am trying to add existing source files, and than create a new repository from it.

1. Add working copy

2. Select the directory that contain sub-directories each with source files

3. And than in "files in working copy tree" i see only 2 of 4 directories in the tree

One of the directories that isn't shown is hidden, but the other one, have source files in it.

I would love to get assistent on it, havn't found anything relevant on the web

2 answers

Neither Mercurial or Git care about folders, only files, so if there are no files in those folders which are not ignored by your ignore settings, the folders will not appear. You can only add files to hg and git.

As I have mention: "One of the directories that isn't shown is hidden, but the other one, have source files in it."

So I am fine with the fact that the empty directory isn't shown, But the other directory does have content, both files and directories, and it is not showing...

The key point was 'not ignored by your ignore settings'. If they're not showing, it's because they're ignored. Check out your global ignore settings (Preferences > Mercurial/Git > Global Ignore List), and also if you have any .hgignore or .gitignore files in the local folders which could be excluding these files.

You can also change the filter at the top of the file list from 'Show Pending' to 'Show Ignored' if you want to see files which have been ignored by your settings.

I have found the problem and fixed it, thank you for the effort, I'll post the details in hope it will save time for someone else..

So the key problem here, was that I am totaly new to GIT and to SourceTree, and while trying to figure out the right way to start working with it, it is possible that I have created a repository under one of the sub-directories.

It created the .git directory, which is hidden when working with MacOS finder.

SourceTree ignored the directory because it identify its .git directory as seperate repository.

* I would suggest to think of small feature to avoid such cases, that instead of don't display this directory, it should have display it "disabled" with icon that clearfy it belongs to other git repository.

* As mention to the tech-support, you should really have SSO, it is unbeliviable to register seperatly to "answers" and than to "customer support", and all this, when i am already registered user of atlassian :)

I'm glad you sorted this out.

Yes, the '.git' naming convention is actually what Git uses itself to store repository data, and the presence of it makes Git think that this is a nested repository, so it doesn't display any of the status of this subfolder in the enclosing repository, unless you add it as a submodule (please see the Help on what submodules are and how they work, although if you're new to git you might want to skip that for now!).

SourceTree simply calls Git to get status information and to perform basically all its actions, so what Git ignores, SourceTree ignores - unfortunately there's no way to force Git to display these nested repositories in the status because it considers them to be separate, and to make SourceTree search through the file system itself to plug this (rare) gap would add a burdensome performace overhead that most people wouldn't accept.

FWIW, I agree with you that Atlassian could really use a single sign-on system to cover answers, support and the jira bug tracker. I'm asking about this internally.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in United States

Topic Tuesday: What's your favorite topic?

Good morning All, Our goal is to get you into the habit of while enjoying your favorite morning drink you are checking the NOVA "space" for topics and comments. Your input is really needed and...

60 views 4 0
View post

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you