title: Recovering GitStack installation?
body: <p>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?</p>
  
  <p>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.</p>
  
  <ol>
  <li><p>I installed Git for Windows according to <a href="https://github.com/PowerShell/Win32-OpenSSH/wiki/Setting-up-a-Git-server-on-Windows-using-Git-for-Windows-and-Win32_OpenSSH" rel="nofollow noreferrer">the tutorial</a></p></li>
  <li><p>I created a bare repository somewhere on my disk: <code>git clone --bare C:\Repositories\Blah.git</code></p></li>
  <li><p>I navigated into the repository from the disk pulled out of my old laptop</p></li>
  <li><p>The existing <code>./.git/config</code> file still referenced my old GitStack local server. I removed that via <code>git remote remove origin</code></p></li>
  <li><p>Now my existing repo needed to be updated to refer to the Git for Windows local server installed in step 0. The command was: <code>git remote add origin myusername@localhost:C:/Repositories/Blah.git</code></p></li>
  <li><p>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:</p>
  
  <p><code>git config --local remote.origin.uploadpack "powershell git-upload-pack"</code></p>
  
  <p><code>git config --local remote.origin.receivepack "powershell git-receive-pack"</code></p></li>
  <li><p>I pushed the master branch to the origin via: <code>git push -u origin</code></p></li>
  <li><p>I switched to the student branch via: <code>git checkout student</code></p></li>
  <li><p>I pushed the student branch to the origin via: <code>git push -u origin</code></p></li>
  <li><p>Then, to test, I created a new repository elsewhere:</p></li>
  </ol>
  
  <p><code>git init Blah
  cd Blah
  [same commands from steps 5 and 6]
  git fetch
  git pull origin master</code></p>
  
  <ol start="11">
  <li>From there I could switch between branches without having to merge, as expected, via <code>git checkout student</code>.</li>
  </ol>