LinkedIn emplea cookies para mejorar la funcionalidad y el rendimiento de nuestro sitio web, así como para ofrecer publicidad relevante. Si continúas navegando por ese sitio web, aceptas el uso de cookies. Consulta nuestras Condiciones de uso y nuestra Política de privacidad para más información.
LinkedIn emplea cookies para mejorar la funcionalidad y el rendimiento de nuestro sitio web, así como para ofrecer publicidad relevante. Si continúas navegando por ese sitio web, aceptas el uso de cookies. Consulta nuestra Política de privacidad y nuestras Condiciones de uso para más información.
I will give a brief introduction to the Git Version Control System (VCS). Short demonstration of using git with WordPress. The demo will be for coding a theme or child theme. Then advantages and disadvantages of using a VCS.
You Show the client a really great
feature but she doesn’t like it so
you delete your code
A few days later your client
suddenly loves the great feature,
but you’ve deleted it.
How do you manage your project
You may use a naming convention like:
Added Great Feature
You may add a comment to the end of the file
name to remember what edit it contains
Deleted Great Feature
Great Feature Again
In A project you’ll deal with multiple
files with different versions that
could go up to the thousands
○ Version control, revision control or source control
○ any kind of practice that tracks and provides control
over changes to source code (Wikipedia)
○ All software projects have some form of version
○ Version Control Systems usually run as stand alone
○ Some examples are CVS, Subversion (SVN),
Mercurial and Git
Git (and VCS in general)
●Share code easily
●Track changes ( and undo or redo them easily)
●Clearly communicate what changes have
●Improve workflow (easier to plan and execute
How it works
●Git maintains a repository: A collection of
project files with special information such as
what changes occurred, a description of each
change, and who made the change.
●Git does not automatically track changes, it
has to be explicitly told when a version is
finished, when that happens it’s called a
●Commits are stored as hidden files in the
repository so that your project looks like it
would without a VCS.
●Git provides a set of tools to manage the
●Git is accessed through the console/terminal
(there are GUI tools but the terminal is the
most powerful method)
Common Commands in Git
●Init - initialize repository
●commit - move changes to the repository
●checkout - Retrieve a version of the project
●branch - A separate version from the main
version of a project
●master - The main version
●merge - combine all the changes of two
branches into one.
●log - a summary of the commits performed
●status - the current state of the repository
showing tracked/untracked files, and changes
since last commit
Working with Git in WordPress
There are many different workflows for using Git
with WordPress, each with its strengths and
weaknesses. For demonstration sake I will
show how to track the development of a child
theme with Git.
The demonstration may not follow WordPress
best practices. The goal is to demonstrate Git
as simply as possible.
Checkout between the master and
previous commit and observe how
the site changes on reload
Wow! A lot of work for just a footer!
●The exercise shows the basic concept of git, in
practice you won’t have to commit every little
●The git workflow you use will depend on
personal or organisational preference
●As you get used to the commands and use git
consistently it will become a powerful tool
●The demo did not even go into the powerful
concept of branches
Why Use Git?
●Easier sharing (Github and Bitbucket)
●Getting a job (Any company with a clue uses
come kind of version control.)
NB git is not a backup tool
●Git is awesome for WordPress except you
can’t sync the database
●VersionPress is a plugin that aims to resolve
●VersionPress was meant to be for people who
aren’t interested in the technical side of git,
however it is still challenging to install and use
What VersionPress can do
●Automatically track any changes on
WordPress e.g. a post update, or plugin
●Undo any actions like the above mentioned
●Merge two databases. So you can sync your
production site with your development site.
●Most of what git can do
●You made it to the end of my boring
●Harare WordCamp team
●Thanks to the sponsors
●Keep cultivating the culture of sharing!
Nigel Rodgers: email@example.com