...
As the name of this tutorial suggests we will be using Git. If you don’t have Git installed, you can follow this tutorial.
Table of Contents |
---|
Repository setup
This part of tutorial show you how to setup empty repository, add .gitignore to your repository and setup remote repository. If you have an existing repository, folllow How to setup existing repository tutorial below.
...
Code Block | ||
---|---|---|
| ||
cd \path\to\your\dumpDirectory\projectId git init |
Adding .gitignore
Next step is to add gitignore file to your project.
Shell uses dumpMetadata.json to track changes in dump. We dont want to version this file in our commits. We also don’t recommend versioning data CSV files.
...
Code Block | ||
---|---|---|
| ||
git add .gitignore git commit -m "Added gitignore" |
Setting remote repository
We recommend saving your changes to remote repository provided by GitHub, Bitbucket or some other hosting service.
...
You have finished setting up your git repository. You can check you remote repositories with git remote -v
.
How to setup existing repository
Anchor | ||||
---|---|---|---|---|
|
If you already have existing repository, you can clone it. Open command line and go to your dump directory eg. cd \path\to\your\dumpDirectory
. Now use git clone <repo-url>
. It will create new directory in your dump directory.
...
Now you should have new directory in your dump directory.
Saving changes to the repository
Whenever you make changes to the project you should commit them. In this part we will show you steps to take.
push your changes to CleverMaps with CleverMaps Shell - use
addMetadata
andpushProject
. Do not commit unfinished work.open command line in your project repository and run
git add .
. This will add all the changes to be commited. (see git add). You can review added files withgit status
.commit your changes with
git commit -m "<commit_message>"
. Use descriptive commit messages.push your changes with
git push
.
Restoring backup
This part of tutorial showcases how you can restore older version of CleverMaps project using Git.
...