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

  • SEARCH
  • Home
  • 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 6661409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:16:34+00:00 2026-05-26T02:16:34+00:00

I have a local repository where I work daily and a remote bare repository

  • 0

I have a local repository where I work daily and a remote bare repository where I push my result. I would like after every push to copy some local files that are not under version control (like .exe and .dll files) into a separate directory (bin directory for example) on the same server, is it possible?
I tried with hooks but those work server-side, hence I don’t know how to tell where the files to copy are.

  • 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-26T02:16:35+00:00Added an answer on May 26, 2026 at 2:16 am

    git’s hooks aren’t necessarily “server-side” – you can have hooks in any repository. However, there isn’t a hook which is run specifically after you’ve done a git push from a repository. Something that might be close enough is a post-commit hook, so that every time you create a commit locally, you could copy the .exe and .dll files into a separate directory.

    However, if you really do just want to copy after pushing, the simplest solution might be to set up a git alias. For instance, if you do:

    git config alias.push-and-copy \
        '!sh -c "git push origin master && cp *.dll *.exe ~/bin"'
    

    … you can just do:

    git push-and-copy
    

    … in your repository, and the files will be copied if the push was successful. (I haven’t tested that alias, but I think that’s right.)

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

Sidebar

Related Questions

I have a local repository I'm working on and its remote is hosted on
I currently have a local Git repository, which I push to a Github repository.
I'd like to get a local GIT repository in sync with both a remote
I have a local repository that I have now decided to push to a
I am using a local repository (which doesn't work at all like the local
I created a small local Git repository on my laptop to start some work.
I have a local git repository that I've done quite a bit of work
I have a local repository. I created the whole application, but now I want
Totally new to Capistrano. I have a local git repository that I want to
Since version 1.5 Subversion supports to have a local caching-proxy for the main Master-repository.

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.