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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T19:59:11+00:00 2026-05-29T19:59:11+00:00

After editing my old question a few times, I make a new one because

  • 0

After editing my old question a few times, I make a new one because it is a new question now.

In .git/hooks/post-update I have:

echo "a" >> /home/pi/log
git update-server-info
git stash
git merge testing >> /home/pi/log

To make an automated checkout. So I run on the client:

git push testing HEAD:testing

Now my /home/pi/log contains:

a
Updating ae2f44b..04753a9
Fast-forward
 application/views/main/index.php |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

But the file did not change!

$ git merge testing
Already up-to-date.

If I remove the script, make the push and run git stash, git merge testing it works.

Update

For testing I changed a number in a file from 17 to 20. I can see the right file version if I run

git show application/views/main/index.php

but

vim application/views/main/index.php

Still contains the old number. But git claims the file is updated:

$ git merge testing
Already up-to-date.
  • 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-29T19:59:14+00:00Added an answer on May 29, 2026 at 7:59 pm

    The solution is to use post-receive as Alex pointed out. Also you need run unset GIT_DIR at the top of your script.

    On the server I have created a second branch and switched to it:

    $ git branch
      master
    * testing
    

    My .git/hooks/post-receive now looks like this:

    unset GIT_DIR
    cd ..
    git merge master
    

    On the client I run git push.

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

Sidebar

Related Questions

After reading and installing the application on the post at Editing a variable-length list
This should be an easy one for someone. After editing the HTML in Firebug,
Credit to @Nick Brunt, after some editing and now this is exact what i
After editing a column, I wanted to update another column in a datagridview. For
After reading this question , I was reminded of when I was taught Java
Fiddle me this: http://jsfiddle.net/TrySpace/QZMP6/17/ After editing the input field, the html updates on each
After editing some code I am getting 4 build errors : Undefined symbols for
I am making App. that includes Picture Editing, After Editing I want to save
I have a project for one dll I use in a wp7 game. After
I've got an old, legacy VB6 application that uses the DHTML editing control as

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.