Committing and pushing to the remote Magnolia Git repository
After developing and testing new code in your local instance of Magnolia, you are ready to commit and push your work to the remote Magnolia Git repository.
This page explains how to send your new features to the remote
repository to make them available in your cloud-based Magnolia package.
Remember that the code must be stored in the
of your local Git repository.
To get your code updates to the cloud-based Magnolia package, you execute three Git commands:
commit command creates an entry in the Git repository history. You
can do multiple commits before pushing. If you are an advanced Git user,
you can also rebase your commits before pushing them.
Here are the (simplified) Git commands. You should execute them in the root folder of the local Git repository:
cd /Users/<username>/dev/repo/mgnl-cloud-packages/magnolia-docs git add light-modules/ git commit -m "Add light-module 'hello-cloud'" git pull git push
commit and before you
push, you should
pull. The Git
pull commands means
fetch & merge.
Pull gets the latest changes
from the remote repository. If there has been a change pushed by
somebody else before your last
pull, you may have to resolve a
Git may prompt you for a password to the remote Git repository when
This is a simplified description of how you can work with Git. In a more realistic scenario, you could work on a Git branch or fork, possibly with multiple remote git repositories: one for development only and the one connected to Magnolia for deployment.
Once you have pushed your work to the remote Git repository, you can access your work through the Magnolia cockpit.