An express tutorial has been made and is available at : https://doc.tiki.org/VideoTutorial-2743-Tiki%20and%20Git%20workflow
A Git repository is available at git.tiki.org and is synced with SVN repository at SF.net, so that developers can either develop using Git or SVN. The complete workflow is being implemented and is documented at Git and SVN combined workflow.
The workflow is now experimental. If you want write access to git.tiki.org, ask Marc Laporte
Here are some tips that will make life easier when changing a development environment from SVN to Git:
Since Tiki integrates with external services, sometimes one VM per branch is an important setup. One possible setup to solve this is having the tiki.reference in your host and use sshfs to mount it inside your VM:
The instructions below will configure that to be automatically mounted, adjust user and directories to your local setup:
mkdir gitcache su - apt install sshfs fuse autofs modprobe fuse echo fuse >> /etc/modules echo '/home/lfagundes/gitcache /etc/auto.sshfs uid=1000,gid=1000,--ghost' >> /etc/auto.master echo 'tiki.reference -fstype=fuse,rw,nodev,nonempty,noatime,allow_other,max_read=65536 :sshfs\#lfagundes@host\:/home/lfagundes/devel/tiki.reference' > /etc/auto.sshfs exit ln -s gitcache/tiki.reference
The magic synchronization of SVN and Git, done by Subgit, is a complex problem. We've have observed a weird behaviour when commit order is not chronological, probably consequence of a
git pull --rebase. To keep things simpler for synchronization to work as expected, here are some tips:
- Don't use
git pull --rebase. Instead, do a
git fetch; git rebase --ignore-date.
- Avoid git merges inside same branch. If a git pull causes a merge, abort the merge and run the fetch/rebase above.
- Better to push your changes as soon as you commit them, so you don't stack changes with same datetime when rebasing.
Information below concerns the Git repository at GitHub, which used to be synced with sync2git and is not working properly. Information remains here while git.tiki.org is evaluated and implemented.
If you prefer to download Tiki via GIT, which might be more useful for your internal development processes, you can access that mirror here: https://github.com/tikiorg/tiki
Note: This page needs more info on how one can effectively use GIT within one's own development process
Related Question: Will Tiki ever migrate to GIT from SVN? see What ToDo When Migrating To Git for the answer.
- cd into your local mfm git master clone, and make sure it's up to date with
$ git pull
$ git status
- to check you haven't got anything stuck in there to push (if you want to clear any changes and LOSE them do "git reset --hard origin/master")
$ git remote add upstream https://github.com/changi67/tiki.git $ git fetch upstream
- and it should start downloading the entire internet (actually just Tiki i think, takes a while)
- If you get any errors about SSL certificates try "git config --global http.sslVerify false" and retry the fetch upstream one.
- Then to actually do the merge do
$ git pull upstream 12.x
$ git fetch upstream
And you may need to close and reopen your IDE project to show the new branches.
Whenever there is a new committer to Tiki, the sync2git code will fail, as it tries to map the new committer in SVN to the GIT committer, or some other problem might be causing the issue.
First thing to do would be to check /var/log/sync2git.log, or to try running the sync2git again.
If the problem is due to new committer: You will receive an error saying that a certain committer could not be found. On the community server ovh.tiki.org, there is a file: /etc/sync2git/projects/tiki/authors.txt
Add a new line at the end of the authors.txt:
committersfaccountname = committersfaccountname <firstname.lastname@example.org>
But first, make sure the name does not already exist in the file so that you are adding the right committer.
Once you added that line, save the file, and then you need to remove the lock file:
sudo rm /var/lib/sync2git/tiki/.lock
Finally, execute sync2git: