0

I installed Git on my Pi and it was running very good. I set up a repository on the USB drive.

Recently, there was some issue with my SD-Card and I just moved to a newer card. Now, how should I be able to setup the old git repository on the USB drive using the RaspBian/Git on the new card so that I do not lose the history?

I tried following the instructions here: https://gist.github.com/manakor/8972566, but this does not work at the point when I try to push to my new repo git push --all new-origin.

Can someone help?

  • You have a repository on a USB drive, now you want to "to setup the old git repository on the new card". Does that mean you want to copy files from the USB drive to SD Card? – techraf Aug 8 '16 at 12:56
  • @techraf, I want to keep the repository in the same location. But as I moved to the new SD card, it lost the configuration and SSH keys associated with the old repository. – Kangkan Aug 8 '16 at 13:13
  • 2
    But there is no configuration. You can create new SSH keys, point to the git repository and you're done. The procedure you linked is to sync a single repository between two separate machines. I can't even imagine how would you start with it given your situation. – techraf Aug 8 '16 at 13:19
  • Got this resolved. As I am using Windows 10 on my client machine, the ssh key was stored on the machine for the same IP. This was causing the issue. Removing the ssh key resolved the issue. Thanks. – Kangkan Aug 8 '16 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.