Warning: This page has not been updated in over over a year and may be outdated or deprecated.
development:recommended_tools:git
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
development:recommended_tools:git [2015/12/11 20:09] – ↷ Page moved from vufind2:git to development:recommended_tools:git demiankatz | development:recommended_tools:git [2022/12/14 18:36] – Add (R) demiankatz | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Git ====== | ====== Git ====== | ||
- | Git is a distributed version control system. | + | Git is a distributed version control system. |
===== Cloning the Repository ===== | ===== Cloning the Repository ===== | ||
- | To get a copy of the latest | + | To get a copy of the latest |
< | < | ||
Line 17: | Line 17: | ||
</ | </ | ||
+ | ===== Managing a VuFind® Installation Using Git ===== | ||
+ | |||
+ | Git can be a useful tool for managing and deploying your local custom installation of VuFind®. This section describes one possible approach. It assumes some familiarity with Git; see below for resources to help you learn more. | ||
+ | |||
+ | ==== Getting Started ==== | ||
+ | |||
+ | 1.) Create a fork of the main VuFind® repository. If you plan on tracking your configuration files in Git, be sure that this is private -- you can either use a private GitHub repository or host your own Git repository on a local server. | ||
+ | |||
+ | 2.) On your server, clone the fork and check out the appropriate branch or tag for your needs. If you want to stay up to date with bleeding-edge development, | ||
+ | |||
+ | 3.) From the checked-out branch or tag, create a new branch for your local work on the server (for example, you might create a development branch for your development server, a staging branch for your staging server, and a production branch on your production server). | ||
+ | |||
+ | 4.) Set up [[development: | ||
+ | |||
+ | 5.) Set up and configure VuFind® (you can follow the usual [[: | ||
+ | |||
+ | 6.) Commit your local custom code and configuration, | ||
+ | |||
+ | ==== Deploying on Multiple Servers ==== | ||
+ | |||
+ | As suggested in step 3 above, if you have a development --> staging --> production cycle, it is useful to create a separate branch for each server where you are deploying VuFind®. This way, you can use simple Git merges to move changes through the cycle. | ||
+ | |||
+ | === Establishing and Updating a New Server Branch === | ||
+ | |||
+ | Imagine that you have established a branch on your development server called " | ||
+ | |||
+ | 1.) Clone the private repository. | ||
+ | |||
+ | 2.) Check out the development branch. | ||
+ | |||
+ | 3.) Create a new " | ||
+ | |||
+ | 4.) Adjust configurations to reflect the staging server. | ||
+ | |||
+ | 5.) Commit the changes and push them up to your private repository. | ||
+ | |||
+ | From this point forward, updating your staging server to receive the latest changes from development is simply a matter of pushing up the development branch from the development server, fetching the changes on the staging server, and merging the latest " | ||
+ | |||
+ | ==== Upgrading ==== | ||
+ | |||
+ | You will periodically want to update your fork with upstream changes -- for example, when a new feature you need is added to the dev branch, or when a new official release is issued. | ||
+ | |||
+ | For example, suppose that you established a " | ||
+ | |||
+ | 1.) Set up a remote named " | ||
+ | |||
+ | 2.) Perform a "git fetch upstream" | ||
+ | |||
+ | 3.) Perform a "git merge v5.0" to bring in the release 5.0 changes. | ||
+ | |||
+ | 4.) Run " | ||
+ | |||
+ | 5.) Update your local configurations and customizations as described in the [[installation: | ||
+ | |||
+ | :!: The [[videos: | ||
===== Learning More ===== | ===== Learning More ===== | ||
Line 24: | Line 79: | ||
* [[http:// | * [[http:// | ||
- | * [[git-branches|Useful Git Branches]] - Branches in the VuFind | + | * [[development: |
---- struct data ---- | ---- struct data ---- | ||
+ | properties.Page Owner : | ||
---- | ---- | ||
development/recommended_tools/git.txt · Last modified: 2022/12/14 18:39 by demiankatz