Bitbucket不会在主题目录中显示更改 [英] Bitbucket not showing changes in themes directory

查看:183
本文介绍了Bitbucket不会在主题目录中显示更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在OS X上使用Sourcetree。我正在开发一个WordPress项目。出于某种原因,我在'主题'目录中所做的更改不会显示为未分级文件。如果我将测试文件添加到/ wp-admin /或/ wp-content /,它会将测试文件显示为未冻结。

我检查了.gitignore,它是空的。



任何帮助表示赞赏。谢谢!

解决方案

澄清问题。如果SourceTree无法识别未跟踪的文件,那么您应该采取一些步骤。


  1. 仔细检查您是否列出文件/目录在 .gitignore

  2. 打开该存储库的GIT控制台并运行 git status 这应显示是否可以通过GIT检测到任何更改。

  3. 转到您遇到问题的目录,并查看是否有任何 .gitignore 文件或 .git 文件夹。如果它们存在,则删除它们应允许您将这些文件添加到您的存储库中。

警告:
有时在里面有一个Repo回购是由设计(通常称为子存储库),并可能导致问题,如果删除。

编辑:



我刚刚使用两个回购复制了这种情况,并且一旦 .git 被删除,源代码树就会看到未跟踪的文件。
你可以打开一个终端窗口到这个主题目录并执行 ls -a


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!

解决方案

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?

这篇关于Bitbucket不会在主题目录中显示更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆