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 531895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:20:55+00:00 2026-05-13T09:20:55+00:00

Can I set hooks for pull/pushing from/to a git-svn managed repository? The situation is

  • 0

Can I set hooks for “pull”/”push”ing from/to a git-svn managed repository?

The situation is that I have a project host on Google Code, and use git to manage the local working copy. I want to set some hooks so that when checking in/out data from/to the SVN repository with git svn fetch and git svn dcommit, I can do some modification to the commit. Since I do not host the SVN repository, I can’t set hooks on the server side.

Is there any hook I could use? Or is there a way to “mark” an ordinary branch, so that git pull and git push on that branch will check in/out from/to a SVN repository instead, therefore the normal git hooks could be used?

Thanks in advance.

  • 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-13T09:20:55+00:00Added an answer on May 13, 2026 at 9:20 am

    As illustrated by this thread, you can have hooks on the Subversion side which can actually reject your git svn dcommit based on some criteria.

    But if you need git hooks on the Git side, I would recommend setting up an intermediate bare Git repository (bare for easy push/pull).
    On that bare repo, you can have any hook you need, as shown in "how do I deploy multiple branches to different directories via git push?" (not about svn but just here to detail a similar setup of an extra repo)

    • if the intermediate repo validate your push, it could trigger the git svn dcommit.
    • it can also, on a git fetch request, trigger a git svn fetch and validate it, before allowing your own git fetch to move forward.

    (2 years later)

    David Souther proposes a solution in his blog (April 2012)

    The solution I have is to have a repository with split heads. Most of the time, the intermediate repository will have an empty working directory. When a push happens, it will check out master, verify the build, and push to svn, before returning to the empty branch.

    We’re going to set up an intermediate git repo with two branches.

    • master will still point to the SVN repo,
    • and the new branch stage will let us keep the working directory clean and in sync with downstream changes.

    Check out his gist.

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

Sidebar

Related Questions

My situation is this: I have a Subversion server set up at my home,
I have a set of checkboxes with multiple choice allowed. I parse the set
I have a type: public class IssueForm { Order Order {get; set;} Item Item
For any custom dialog (form) in a WinForm application I can set its size
In SVN is there any way to set (bugtraq) properties on all directories in
We're using git with a central repo (using Gitosis). I've created a post-receive hook
I needed to create a custom select list for the user registration page that
I have a Qt Dll wich I inject into a third-party Application using windows
I'm using Windows Vista and C#.net 3.5, but I had my friend run the

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.