6
2
We had a Git repo that was lost when the we forgot to back it up. One of us did a pull right before this happened and therefore has the latest code. Is it possible to rebuild the Git repo from a local copy of the sources? How?
6
2
We had a Git repo that was lost when the we forgot to back it up. One of us did a pull right before this happened and therefore has the latest code. Is it possible to rebuild the Git repo from a local copy of the sources? How?
5
Your local copy is a Git repository on its own, containing the entire commit history (although only of the master
branch). Creating an empty repository in the old location (git init --bare whatever.git
), then running git push
from the local copy should be sufficient.
2Depending on the configuration, you may wrong w.r.t. the
master
branch. For me all branches and tags get fetched. – maaartinus – 2012-06-10T10:40:37.653