Actions
HowTo keep in sync your git repository for redmine » History » Revision 2
« Previous |
Revision 2/12
(diff)
| Next »
Jim Mulholland, 2009-05-19 17:32
HowTo keep in sync your git repository for redmine¶
Here an HowTo written by Farzy (Farzad FARID) on how to keep two git repositories syncronized
- Automatic synchronization 2 git repositories [en]
- Synchronisation automatique de deux référentiels git [fr]
Summary Of Above Blog Post
In the below example, "git_user" and "project.git" should be modified for your GitHub project
git clone --bare git@github.com:git_user/project.git project.git cd project.git git remote add origin git@github.com:git_user/project.git git fetch -v git fetch origin git reset --soft refs/remotes/origin/master
In this cron script, "app" is the owner of the project.git directory
sudo vi /etc/cron.d/sync_git_repos # One-way synchronization of a local and remote bare Git repository. # Repeat this line for each repository. */5 * * * * app cd /path/to/project.git && git fetch origin && git reset --soft refs/remotes/origin/master > /dev/null
Updated by Jim Mulholland almost 15 years ago · 2 revisions