Application version management » History » Version 5
Herve Caumont, 2013-10-03 13:13
| 1 | 1 | Herve Caumont | h1. Application version management |
|---|---|---|---|
| 2 | |||
| 3 | 4 | Herve Caumont | {{>toc}} |
| 4 | |||
| 5 | 1 | Herve Caumont | Application version management benefits from different tools available from a Developer Cloud Sandbox. |
| 6 | |||
| 7 | h2. Using Git |
||
| 8 | |||
| 9 | Git is a distributed version control and source code management system with an emphasis on speed. |
||
| 10 | Every Git working directory is a full-fledged local repository with complete history and full version tracking capabilities, and thus not dependent on the network or a central server. |
||
| 11 | |||
| 12 | We will describe here how to setup a Git working copy of an application folder, locally to a Sandbox, and how to push it to a GitHub code repository, for application sharing and collaborative development environment on the Web. |
||
| 13 | |||
| 14 | GitHub (http://github.com) is a web hosting service for software development projects, that uses the Git version control system. The service provides social networking tools such as feeds, watchers, and a social network graph to visualize how developers exploit their versions of a repository. |
||
| 15 | |||
| 16 | !local-remote.png! |
||
| 17 | |||
| 18 | h3. Step by step with Git |
||
| 19 | |||
| 20 | 5 | Herve Caumont | To initialize your Git local repository, with a synchronization to a web backup repository (GitHub), one option is to start from a repository previously initialized for a Sandbox project on Terradue's GitHub. |
| 21 | 1 | Herve Caumont | |
| 22 | 5 | Herve Caumont | Start to save all the files of your /application folder. |
| 23 | Then ensure you have a clean, empty /application folder. |
||
| 24 | 1 | Herve Caumont | <pre> |
| 25 | [user@sb ~]$ cd /application |
||
| 26 | 5 | Herve Caumont | [user@sb ~]$ ls -al |
| 27 | </pre> |
||
| 28 | Then type: |
||
| 29 | <pre> |
||
| 30 | 1 | Herve Caumont | [user@sb ~]$ git clone git@github.com:Terradue/geowow-1.git ./ |
| 31 | </pre> |
||
| 32 | |||
| 33 | You'll have to give your certificate passphrase. |
||
| 34 | 5 | Herve Caumont | As a result, this is creating the Sandbox's Git repository (.git) under your "application" folder, with synchronization to the web-based GitHub repository "geowow-1". |
| 35 | 1 | Herve Caumont | |
| 36 | 5 | Herve Caumont | *From working directory to staging area* |
| 37 | |||
| 38 | Then copy your Application files back in your /application working directory. |
||
| 39 | Add your Application files in the sandbox's Git version control system: |
||
| 40 | 1 | Herve Caumont | <pre> |
| 41 | [user@sb ~]$ cd /application |
||
| 42 | [user@sb ~]$ git add application.xml yourSubFolder1/ |
||
| 43 | </pre> |
||
| 44 | |||
| 45 | 5 | Herve Caumont | As a result, this is adding (referencing) file contents to the Git index (staging area). |
| 46 | 1 | Herve Caumont | |
| 47 | 5 | Herve Caumont | *From staging area to local repository* |
| 48 | |||
| 49 | 1 | Herve Caumont | To commit your Application in the sandbox's Git version control system: |
| 50 | <pre> |
||
| 51 | [user@sb ~]$ git commit |
||
| 52 | </pre> |
||
| 53 | |||
| 54 | 5 | Herve Caumont | As a result, this is recording files changes to the Git local repository. |
| 55 | 1 | Herve Caumont | |
| 56 | 5 | Herve Caumont | *From local repository to remote repository* |
| 57 | |||
| 58 | To push your application on a webbackup area, for example on a dedicated GitHub repo (here the GitHub private repo https://github.com/Terradue/geowow-1 provided by Terradue to Sandbox users): |
||
| 59 | 1 | Herve Caumont | <pre> |
| 60 | 5 | Herve Caumont | [user@sb ~]$ git push |
| 61 | 1 | Herve Caumont | </pre> |
| 62 | |||
| 63 | 5 | Herve Caumont | As a result, this is updating the remote repository with the files changes from the Git local repository. |
| 64 | 1 | Herve Caumont | |
| 65 | h2. Using Hadoop runs folders |
||
| 66 | |||
| 67 | Upcoming! |