Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm using Sourcetree on OS X. I'm working on a WordPress project. For some reason, changes I make in the 'themes' directory are not being shown as Unstaged files. If I add a test file to /wp-admin/ or /wp-content/ it shows the test file as unstaged. I can't figure out why themes files are not being tracked.

I checked .gitignore and it's empty.

Any help is appreciated. Thanks!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
210 views
Welcome To Ask or Share your Answers For Others

1 Answer

To clarify the question. If SourceTree fails to recognize un-tracked files here are some steps you should take.

  1. Double check that you are not listing the file/directory in .gitignore
  2. Open up a GIT console for that repository and run git status This should show whether any changes are detectable by GIT.
  3. Go to the directory in which you are having problems and look to see if you have any .gitignore files or .git folders. If they exist then deleting them should allow you to add these files to your repository

Caution: Sometimes having a Repo inside a repo is by design (often referred to as a sub-repository) and could cause issues if removed.

Edit:

I just replicated this scenario with two repos and source tree appeared to see the untracked files once the .git was removed. Could you open up a terminal window to that themes directory and do an ls -a?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...