3

Our project is using a nightly backup application that simply makes a duplicate of our git repository. We had a case come up where we needed to restore from the backup. Since it was just a duplicate we assumed we could just copy the duplicate back to our server and everything would just work. However, some developers did do some pushes the morning after the backup. We assumed these developers would just have to push again. However, after a push is performed and another developer pulls, the other developer only sees commits (via git log) upto the date of backup, they cannot see the commits from morning after the backup.

Not sure what is going on or what to do here...

1 Answer 1

1

Just make sure the push is done on the right branch, the log is being seen on the same branch. Also, confirm if the repo on the server does have the changes pushed. Ideally, there should not be any trouble, backup or not, because this is fundamental to how DVCSs work.

Sign up to request clarification or add additional context in comments.

3 Comments

I think he's saying the problem is that the developers' copies think they have already pushed changes upstream that upstream no longer has. Does git record the expected state of upstream? (I'm not a git guru.)
@Rup - See, this scenario is same as you pushing to the upstream, and also, you add a new upstream and push to it as well. There is no difference from that. A simple test would be to create a repo, add some commits and clone it. Pushing from clone will say everything up-to-date. Reset main repo few commits back, and push again. Changes will go in.
The git log on the bare repo for the server was not showing the updates. Had to update the git config files so that origin pointed to the new machine. Still not sure why we didn't see a failed push...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.