Loading...
 

Git clone tiki

The clone operation creates a local repository by copying information from a source repository. In the standard behavior, git will bring the entire changes history from source repository to local repository. That means both source and local repository will have the same history at the clone moment.

Cloning Tiki 

The basics 


The basic and short syntax is git clone <repository> <directory>, where the mandatory argument <repository> is the source repository path or URL and the optional argument <directory> is the directory name where git will create the local repository.

By default, the clone process creates a repository in a folder with the same name of source repository, so in this case, the folder for local repository will have the name tiki.

Clone into tiki folder
git clone https://gitlab.com/tikiwiki/tiki.git


By passing a second argument to clone command, it is possible to define the name to the folder for the cloned repository, like the examples below.

Also clone into tiki folder
git clone https://gitlab.com/tikiwiki/tiki.git tiki

Clone into tikiwiki folder
git clone https://gitlab.com/tikiwiki/tiki.git tikiwiki

Clone into current folder
git clone https://gitlab.com/tikiwiki/tiki.git .


Choosing a branch 

By default, the clone operation creates a local repository having the current branch set to master. There is an option called --branch to change this behavior. The examples below creates 3 clones, each one with a different branch set.

Clone and set 18.x into tiki18 folder
git clone --branch=18.x https://gitlab.com/tikiwiki/tiki.git tiki18

Clone and set 19.x into tiki19 folder
git clone --branch=19.x https://gitlab.com/tikiwiki/tiki.git tiki19

Clone and set 20.x into tiki20 folder
git clone --branch=20.x https://gitlab.com/tikiwiki/tiki.git tiki20


Dealing with Tiki huge repository 

The examples above clone Tiki source repository with the entire history. After a decade of contributions, Tiki history sizes 3GB when decompressed locally. That is too big when several Tiki instances is needed. As of now, two approaches were tested to deal with this problem:

  • Share git objects with other clones
    • git clone --shared --reference=<local-repository> <repository> [<directory>]
  • Trim history size
    • git clone --depth=1 <repository>


For example to create a clone of branch 20 in a folder named tiki20 without all the history:

Clone and set 20.x into tiki20 folder
git clone --depth=1 --branch=20.x https://gitlab.com/tikiwiki/tiki.git tiki20

Sharing git history 

That is a good approach to developers needing to have the full Tiki history, but without waste network bandwidth or disk space. Git is capable to borrow information from other local clone when creating a new clone. This reduces the network usage while cloning and reduces disk usage to maintain several Tiki instances.

Information sharing is set by using the option --reference=<local-repository> and the option --shared , where <local-repository> is another clone made before.

The first step is to create a standard Tiki clone, like the example below.

Clone into tikiwiki folder
git clone https://gitlab.com/tikiwiki/tiki.git tikiwiki


Then, other clones can be created by borrowing the information from the clone above.

Clone and set 18.x into tiki18 folder
git clone --branch=18.x --reference=./tikiwiki --shared https://gitlab.com/tikiwiki/tiki.git tiki18

Clone and set 19.x into tiki19 folder
git clone --branch=19.x --reference=./tikiwiki --shared https://gitlab.com/tikiwiki/tiki.git tiki19

Clone and set 20.x into tiki20 folder
git clone --branch=20.x --reference=./tikiwiki --shared https://gitlab.com/tikiwiki/tiki.git tiki20


Trimming git history 

Another available to reduce disk and network usage is the --depth=<n> , where <n> is the number of history entries desired to bring. This approach may not be so good to Tiki development, because the change history is not available. But it is good to keep track of file state when installing Tiki in a server.

Clone into tiki18 folder with 1 commit in history
git clone --branch=18.x --depth=1 https://gitlab.com/tikiwiki/tiki.git tiki18

Clone into tiki18 folder with 2 commits in history
git clone --branch=18.x --depth=2 https://gitlab.com/tikiwiki/tiki.git tiki18


On the examples above, just the last <n> commits of branch 18.x will be available on local repository. All other information about branches and tags will not exist on local repository.

It is possible to have a cloned repository with the last <n> commits of each branch available. This is done by passing --no-single-branch to clone command.

Creating a workspace 

This is just a suggestion on how to setup a workspace in a development environment. The paths below can be set up in Nginx, Apache or any other webserver.

1. Create a base folder and change to it
mkdir "/var/www/html"
cd "/var/www/html"

2. Create a standard tiki clone
git clone https://gitlab.com/tikiwiki/tiki.git tiki

3. Create a clone per tiki instance, referencing the tiki folder
git clone --branch=20.x --shared --reference=./tiki https://gitlab.com/tikiwiki/tiki.git doc.tiki.org
git clone --branch=20.x --shared --reference=./tiki https://gitlab.com/tikiwiki/tiki.git dev.tiki.org
git clone --branch=18.x --shared --reference=./tiki https://gitlab.com/tikiwiki/tiki.git example.com
git clone --branch=master --shared --reference=./tiki https://gitlab.com/tikiwiki/tiki.git tikimaster.docker
git clone --branch=20.x --shared --reference=./tiki https://gitlab.com/tikiwiki/tiki.git tiki20.docker
git clone --branch=19.x --shared --reference=./tiki https://gitlab.com/tikiwiki/tiki.git tiki19.docker
git clone --branch=18.x --shared --reference=./tiki https://gitlab.com/tikiwiki/tiki.git tiki18.docker


After above commands, the working space should have this structure:

/var/www/html/tiki
/var/www/html/doc.tiki.org
/var/www/html/dev.tiki.org
/var/www/html/example.com
/var/www/html/tikimaster.docker
/var/www/html/tiki20.docker
/var/www/html/tiki19.docker
/var/www/html/tiki18.docker

Reference 

Keywords

The following is a list of keywords that should serve as hubs for navigation within the Tiki development and should correspond to documentation keywords.

Each feature in Tiki has a wiki page which regroups all the bugs, requests for enhancements, etc. It is somewhat a form of wiki-based project management. You can also express your interest in a feature by adding it to your profile. You can also try out the Dynamic filter.

Accessibility (WAI & 508)
Accounting
Administration
Ajax
Articles & Submissions
Backlinks
Banner
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Calendar
Category
Chat
Comment
Communication Center
Consistency
Contacts Address book
Contact us
Content template
Contribution
Cookie
Copyright
Credits
Custom Home (and Group Home Page)
Database MySQL - MyISAM
Database MySQL - InnoDB
Date and Time
Debugger Console
Directory (of hyperlinks)
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
DogFood
Draw
Dynamic Content
Preferences
Dynamic Variable
External Authentication
FAQ
Featured links
Feeds (RSS)
File Gallery
Forum
Friendship Network (Community)
Gantt
Group
Groupmail
Help
History
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
jQuery
Kaltura video management
Karma
Live Support
Logs (system & action)
Lost edit protection
Mail-in
Map
Menu
Meta Tag
Missing features
Visual Mapping
Mobile
Mods
Modules
MultiTiki
MyTiki
Newsletter
Notepad
OS independence (Non-Linux, Windows/IIS, Mac, BSD)
Organic Groups (Self-managed Teams)
Packages
Payment
PDF
Performance Speed / Load / Compression / Cache
Permission
Poll
Profiles
Quiz
Rating
Realname
Report
Revision Approval
Scheduler
Score
Search engine optimization (SEO)
Search
Security
Semantic links
Share
Shopping Cart
Shoutbox
Site Identity
Slideshow
Smarty Template
Social Networking
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Staging and Approval
Stats
Survey
Syntax Highlighter (Codemirror)
Tablesorter
Tags
Task
Tell a Friend, alert + Social Bookmarking
Terms and Conditions
Theme
TikiTests
Timesheet
Token Access
Toolbar (Quicktags)
Tours
Trackers
TRIM
User Administration
User Files
User Menu
Watch
Webmail and Groupmail
WebServices
Wiki History, page rename, etc
Wiki plugins extends basic syntax
Wiki syntax text area, parser, etc
Wiki structure (book and table of content)
Workspace and perspectives
WYSIWTSN
WYSIWYCA
WYSIWYG
XMLRPC
XMPP




Useful Tools