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?

6
  • 1
    Do the themes have their own Git repositories? E.g., they probably would if you git cloned them from somewhere, or if you're developing them yourself as standalone products. Commented Oct 24, 2018 at 14:30
  • Please check uploaded theme folder, Is there .gitignore file? Commented Oct 24, 2018 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. Commented Oct 25, 2018 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. Commented Oct 25, 2018 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. Commented Oct 25, 2018 at 16:53

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

2 Comments

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?
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".

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.