My old laptop died with my GitStack installation and local Git repositories on it. It was a hardware issue, and the hard drive wasn't affected (I have the hard drive attached to my new computer and it works with no issues). Of course, I want to install GitStack on my new computer and migrate the old repositories into the new installation. I couldn't find any documentation on this. Has anybody done this, or does anybody knowledgeable about GitStack have any advice for me?
Edit: the user poke who responded was very knowledgeable. Rather than fighting with GitStack -- which appears less supported than it used to be -- I was able to install a local Git for Windows server, and push the contents from my old hard drive as a new repository by using remotes. It worked perfectly.
I installed Git for Windows according to the tutorial
I created a bare repository somewhere on my disk:
git clone --bare C:\Repositories\Blah.git
I navigated into the repository from the disk pulled out of my old laptop
The existing
./.git/config
file still referenced my old GitStack local server. I removed that viagit remote remove origin
Now my existing repo needed to be updated to refer to the Git for Windows local server installed in step 0. The command was:
git remote add origin myusername@localhost:C:/Repositories/Blah.git
The Git for Windows tutorial mentioned some special configuration is presently needed for working around an issue with the current builds. In particular, the tutorial instructs you to enter these commands in your repositories:
git config --local remote.origin.uploadpack "powershell git-upload-pack"
git config --local remote.origin.receivepack "powershell git-receive-pack"
I pushed the master branch to the origin via:
git push -u origin
I switched to the student branch via:
git checkout student
I pushed the student branch to the origin via:
git push -u origin
Then, to test, I created a new repository elsewhere:
git init Blah
cd Blah
[same commands from steps 5 and 6]
git fetch
git pull origin master
- From there I could switch between branches without having to merge, as expected, via
git checkout student
.