Git is a version control tool which allows you to keep a track of changes to your project files, store backups in the cloud and makes the overall collaborative process much easier.
This guide will explain how to push Now Assistant components to Github, however the process should be similar for other cloud version control providers. This guide will assume that you're already registered and are ready to use Github.
First of all let's create a new repository for our component:
In the following screen, you should see the address of your newly created repository. Keep a note of the repository url as we'll need it in the next steps:
For the next steps you need to have Git installed on your computer. If you don't have Git yet, you can install it from here. For this guide we're going to use Git Bash command line interface, however you can use a graphical user interface if you wish to.
First of all let's find the component in our Now Assistant installation directory.
Navigate to Web → SpacesLocal → Global → Components directory where you should see a list of existing components:
For this guide we're going to push 'template-video-card' component to our remote Github repository. In order to do so let's navigate to the component directory using Git Bash command line interface:
cd /c/Program Files/adenin Workplace/Web/SpacesLocal/Global/Components/template-video-card
You can simply drag and drop the folder to Git Bash to get its directory.
Generally, with Github or any other cloud version control system you have 2 repositories: a local and a remote repository. Both, local and remote repositories should be kept in-sync. Since, we already have a remote repository created we're going to create a local repository and connect it to our remote. We'll do that by typing the following commands into Git Bash:
Initialize a new local repository:
Add all the content in our directory to it:
git add .
'Commit' all the content we just added:
git commit -m 'message to indicate what you are committing'
Connect our remote repository with our local one (use the url you received when creating the remote repository here):
git remote add origin your_remote_repository_url
Push the files, you 'committed' to the remote repository:
git push origin master
Now, if you look at your remote repository you should see your files:
Last updated: Tue 31 Oct, 2017