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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:07:37+00:00 2026-05-18T12:07:37+00:00

I’m currently trying to follow the small project based work-group mentioned in the Pro

  • 0

I’m currently trying to follow the small project based work-group mentioned in the Pro Git book : http://progit.org/book/ch5-2.html

So, here’s my set-up:

[Live Website Folder] 
|             |
|             |
Developer1    Developer2

The way that I achieved that was I did the following:

  1. git init –shared=0777
  2. git clone /live/website developer1
  3. git clone /live/website developer2

I was able to successfully clone my project and I went into developer1 folder. Here I make changes to my file index.html. Once, I make these changes, I do:

git add index.html
git commit -m 'Modified index.html --developer1'
git push

Now when I go to my /live/website directory and do a git status, it correctly tells me that the file index.html is modified. When I do:

git add index.html
git commit -m 'Modified index.html by developer1' 

It successfully makes the commit, but when I try to vi index.html, the file that I see is the original/un-modified one. I don’t see the changes made by developer1, within that file. Is this expected behavior?

  • 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-18T12:07:38+00:00Added an answer on May 18, 2026 at 12:07 pm

    What git status is telling you is that index.html is different to what is in the git index.

    After you push, your /live/website repo contains the updated index.html in the index, but the old index.html in the working copy. You need to do git reset --hard HEAD followed by git checkout -f inside /live/website to reset the working copy to the same as the HEAD commit.

    I’d suggest that you modify your setup slightly. Add a staging repository that is bare and push changes into that. Add a post-update hook that runs git pull staging master inside /live/website. This will ensure that the live website gets updated as soon as a commit is pushed in.

    In glorious ascii art:

     /live/website
           |
           |
    /path/to/staging (bare)
      |          |
      |          |
    dev1        dev2
    

    EDIT: Updated to correct command sequence for fixing the working copy.

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

Sidebar

Related Questions

I am currently running into a problem where an element is coming back from
I want use html5's new tag to play a wav file (currently only supported
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I am trying to loop through a bunch of documents I have to put
I have a JSP page retrieving data and when single or double quotes are
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,

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.