1

I am backing up an entire WordPress site to GitHub.
I noticed that it is not adding the themes I upload to the repo.
It will add empty folders, but it does not add any content.

To add content, I was running the command git add -A, then pushing the site.
I'm getting the error

modified content, untracked content

What may be the problem?

zx485
  • 28,498
  • 28
  • 50
  • 59
burnedfaceless
  • 242
  • 2
  • 10
  • 1
    Do the themes have their own Git repositories? E.g., they probably would if you `git clone`d them from somewhere, or if you're developing them yourself as standalone products. – ChrisGPT was on strike Oct 24 '18 at 14:30
  • Please check uploaded theme folder, Is there .gitignore file? – Gufran Hasan Oct 24 '18 at 14:39
  • bkabbott, Stack Overflow works a lot better if you actively participate in solving your problem. There are two questions here whose answers may be important. We can't help you much more without them. – ChrisGPT was on strike Oct 25 '18 at 12:24
  • The theme has its own repo. My workflow probably sucks - I didn't want to get caught up with master, and I didn't want to lose my theme. – burnedfaceless Oct 25 '18 at 13:49
  • Git's behaviour with nested repositories may not be what you expect. The outer repository won't track content from inner ones. There are a few options for how to proceed, including submodules, subtrees, having one large repository instead of nesting repositories, giving your theme its own dedicated remote repository, etc. These options all have tradeoffs so I encourage you to read about them before deciding how to proceed. – ChrisGPT was on strike Oct 25 '18 at 16:53
  • How do I destroy the nested Git repo? I would like to destroy it so that the theme is uploaded to GitHub. – burnedfaceless Oct 26 '18 at 14:37

1 Answers1

0

The flow of commands for pushing changes to Github 1) run in the cli: git add . or git add -A in your case. Then you must commit your changes: 2) run in the cli: git commit -m "these are my changes" 3) run in the cli: git push

The above assumes you are on the master branch. Here is a list of git commands: https://github.com/joshnh/Git-Commands

Angela
  • 26
  • 3
  • This looks like a generic high-level description of how to use Git and GitHub. How does it specifically apply to the OP's question? – ChrisGPT was on strike Oct 24 '18 at 15:31
  • The user said there were untracked content and didn't mention committing changes between adding and pushing. I provided a resource so that user could have a reference for this and other commands that might he might encounter. Thanks though for considering my providing of information "high-level". – Angela Oct 24 '18 at 22:16