As my site becomes more important to my business, I want to have better version control so I can look up past changes and backup my code. I keep seeing people talking about having their entire site in git and I want to know how that works.
I currently have my custom theme in my git repo. The only person who will edit the theme is me. After committing my edits, I deploy by FTP-ing the new files to my site.
How would you have an entire site in git? WordPress, themes, and plugins (I have lots of them!) are updated frequently and would create lots of commits. Do I ignore them? Or do I only commit them when I deploy? How would I keep track of changes to my own theme and custom plugins among all the other commits from updated plugins?
I would love for someone to share some insight into this with me.
P.S. As you might guess I’m fairly new to git, hence the wrong terminology etc. Appreciate it if you explain it like I’m 5 with your answers 🙂
The problem with the linked article in your question is that it is suggesting to download WordPress and then create your own git repo – but then this cannot be easily updated. Instead you can have WordPress itself in git. Rather than the default subversion, there is an offical Github repository of WordPress, and in the same fashion as with subversion tags you just want to clone the latest branch.
Personally I manage things through subversion (but the principles can be converted to Git):