问题
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!
回答1:
To clarify the question. If SourceTree fails to recognize un-tracked files here are some steps you should take.
- Double check that you are not listing the file/directory in
.gitignore
- Open up a GIT console for that repository and run
git status
This should show whether any changes are detectable by GIT. - 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
?
回答2:
If you use SourceTree, open the terminal and use git add <fileName> -f
to force shown any changes in this folder then you can push to Bitbucket
来源:https://stackoverflow.com/questions/32638788/bitbucket-not-showing-changes-in-themes-directory