Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3340468
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:36:40+00:00 2026-05-18T00:36:40+00:00

I want to have git repos accessable in redmine. But what about auto update

  • 0

I want to have git repos accessable in redmine. But what about auto update of redmine git repos. I thought redmine will ‘read’ git repos but it wants to have its own local copy. So then the question of having the latest repo in redmine arises.

I found few solutions using cron but I would prefer to use git hook if possible. Any idea how to make git if there is repository update to also update redmine repository?

redmine wiki provides this solution but I do not understand what it does. Maybe it is what I want? Could somebody explain below code?

echo "Post receive-hook => updating Redmine repository" 
sudo -u my_redmine_user -p secret perl -we '`cd /redmine/repositories/my_repo.git && git fetch && git reset --soft refs/remotes/origin/master`'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T00:36:41+00:00Added an answer on May 18, 2026 at 12:36 am

    That looks like it’s meant to be placed in the post-receive hook of your central repo. That hook is executed whenever you push into the repo, so it’s an ideal place to trigger other operations like this one. (Of course, the post-update hook would also be a reasonable place.)

    The hooks are, surprise, in the hooks directory of a bare repo (.git/hooks for a non-bare repo). If you don’t already have a post-receive hook, you can just create one: make a file called post-receive in the hooks directory, make it executable, put #!/bin/sh on the first line, then those two lines. If there is already one, just add those two lines to it. Since post-receive is meant mainly for notification-type operations, it’s pretty easy for the script to end up being a list of things like this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a git repo, and a revision code I want it to get
I have a git repository with submodules in the directory projects/myRepo and I want
Totally new to Capistrano. I have a local git repository that I want to
I have just created a GIT on a folder. I now want to add
I try to read out all existing calendars. I want have a HashMap with
We have 2 git repos, one of which we expose to a third party
I'm relatively new to Git, but I want to give it a try (vs
Suppose I have a git repos that contains original.script . At some point, I
I have a workflow(on svn) which I am trying to replicate with git, but
I have some shell script where I want to check one of my git

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.