Loading...
 
Skip to main content

History: Git Workflow

Preview of version: 12

Introduction


After almost an year receiving valuable code contribution from community through Gitlab, some difficulties were found by contributors when trying to organize their forked repositories and create a good merge request. This article presents a workflow to mitigate these common problems on contributor side.

Contributing


These steps are recommended when contributing trough Gitlab:

  1. Fork the repository
  2. Clone the forked repository
  3. Checkout the correct target branch
  4. Create a new branch
  5. Commit changes
  6. Push changes
  7. Create a new merge request

Forking the repository

  1. Create an account in https://gitlab.com
  2. Go to Tiki project page, https://gitlab.com/tikiwiki/tiki
  3. Click on fork badge at top right cornet
  4. Select the target group you want to place your fork


Clone repository


The steps below use Git command line, but it can be performed in any Git client embedded in IDE. Also fabiomontefuscolo is the Gitlab user in this example and it should be replaced by Gitlab user who forked the repository.

Copy to clipboard
$ git clone git@gitlab.com:fabiomontefuscolo/tiki.git tiki

Checkout the correct target branch


For each major version of Tiki, there is a working branch. If the contribution is a fix for version 19.1 for example, the contributor must checkout the branch 19.x.

Copy to clipboard
$ git checkout 19.x

Create a new branch


This is a very important step. It is a good idea to create another branch for the contribution. According to earlier steps, the repository now is set to branch 19.x and a new branch will start from this point. Suppose branch with the name fixing-left-sidebar, the following command will create this branch.

Copy to clipboard
$ git checkout -b fixing-left-sidebar


If for some reason the contributor needs to stop his work and start a new one for the same branch 19.x, he can simply commit or stash his changes, switch back to 19.x and create the new contribution he needs. For example, a new urgent task appeared to fix a security issue:

Copy to clipboard
$ git checkout 19.x $ git checkout -b fixing-xss-issue-on-register-form


In this way, the contributor can have two ore more unrelated jobs (fixing-left-sidebar and fixing-xss-issue-on-register-form) for the same target branch (19.x). It will also help on Merge Request creation.

Commit changes


Even running on Gitlab, the community standards for commit messages should be respected. Remember to give a meaningful commit message and prefix it with a suitable tag explained in https://dev.tiki.org/Commit-Tags .

Copy to clipboard
$ git add tiki-file.php $ git commit -m "[FIX] Removing bad characters from registration form to avoid XSS atacks"

Push changes


In order to have changes available to create a new Merge Request, it is necessary to push the created branch to Gitlab.

Copy to clipboard
$ git push -u origin fixing-xss-issue-on-register-form

Create a new merge request

  1. Go to forked repository page in Gitlab https://gitlab.com/fabiomontefuscolo/tiki
  2. Then put mouse over Repository and click on Branches entry
  3. Locate the branch desired (eg.: fixing-xss-issue-on-register-form) and then click on Merge Request button
  4. On top right corner, click on Change branches and select the correct target branch (eg.: 19.x)
  5. Write a detailed description. Include steps to reproduce a bug if needed or how to test a new feature


Wait and interact


Maintainers may ask you changes on that pull request. In this case, just checkout the branch related to the merge request, add new commits and push it again.

Important


When commands like git reset --hard or git push --force is needed, it may be that there is a problem with the workflow and it should be planned again.

History

Advanced
Information Version
07 Jul 19 16:15 GMT-0000 lindon 34
07 Jul 19 15:52 GMT-0000 lindon 33
07 Jul 19 15:41 GMT-0000 lindon 32
01 Jul 19 15:05 GMT-0000 Marc Laporte Now, let's all focus on 20.x 31
28 Jun 19 08:05 GMT-0000 luciash d' being 🧙 30
27 Jun 19 11:42 GMT-0000 Marc Laporte Clean up 29
27 Jun 19 11:40 GMT-0000 Marc Laporte Old link should still work 28
30 Apr 19 00:42 GMT-0000 lindon 27
30 Apr 19 00:40 GMT-0000 lindon flash Plugin modified by editor. 26
30 Apr 19 00:39 GMT-0000 lindon 25
28 Apr 19 12:33 GMT-0000 lindon 24
28 Apr 19 12:32 GMT-0000 lindon code Plugin modified by editor. 23
02 Apr 19 13:16 GMT-0000 Marc Laporte 22
26 Mar 19 21:24 GMT-0000 Marc Laporte Thank you Fabio! 21
18 Mar 19 14:33 GMT-0000 Marc Laporte Referring to the Atomic commit convention, and other tips 20
09 Mar 19 08:45 GMT-0000 Marc Laporte 19
09 Mar 19 08:38 GMT-0000 Marc Laporte 18
09 Mar 19 08:36 GMT-0000 Marc Laporte 17
09 Mar 19 08:32 GMT-0000 Marc Laporte 16
09 Mar 19 08:25 GMT-0000 Marc Laporte 15
09 Mar 19 08:12 GMT-0000 Marc Laporte 14
09 Mar 19 07:56 GMT-0000 Marc Laporte Typo 13
05 Mar 19 17:29 GMT-0000 Roberto Kirschbaum Little change in English phrasing 12
05 Mar 19 17:18 GMT-0000 Roberto Kirschbaum 11
05 Mar 19 17:17 GMT-0000 Roberto Kirschbaum Quick fix 10

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
Diagram
Directory (of hyperlinks)
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
DogFood
Draw -superseded by Diagram
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
Kanban
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
Terms and Conditions
Theme
TikiTests
Federated Timesheets
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

Show PHP error messages