Tuesday, May 14, 2013

Opening a New Project at Redmine Working with Git

In this post the Git and Redmine is assumed to be installed and in use in your environment. Open a new project on Redmine and apply the following steps. I am using the Turn Key Virtual Appliance on Virtual Box. Though you can use following shell codes in other Redmine and Git integration environment by only changing directory paths.

1. Create new git repository and link it to a git file.

cd /srv/repos/git

git init projectname

cd /projectname

touch README.md

git add .

git commit -m "First Commit"

ln -s /srv/repos/git/projectname/.git /var/cache/git/projectname.git

chmod 777 /var/cache/git/projectname.git

2. Link Redmine project to the repository. Select Project > Settings > Repository. And do the following.

3. To work as a remote (bare) repository simply go to the .git repository and  set bare value as true.

cd /srv/repos/git/projectname/.git
nano config
        repositoryformatversion = 0
        filemode = true
        bare = true
        logallrefupdates = true

No comments:

Post a Comment