PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, April 14, 2022

[FIXED] How can I copy my git repository from my windows machine to a linux machine via usb drive?

 April 14, 2022     git, migration     No comments   

Issue

I have a git server running on a windows desktop machine that has inexplicably lost the ability to connect to the internet. I want to move the repo to a linux machine. I already know how to switch my cloned repos to point to the new master once it's setup, but I need to get it to a new machine first.

I assume since windows and linux are a bit different, I can't just copy the repo directory verbatim. But maybe I can? What are my options?


Solution

You can do a git bundle: it will compress the repo in one file. It is easy to move one file, as opposed to a all repo with all its files.

git bundle create /tmp/myrepo.bundle --all

See "How can I email someone a git repository?"

Once copied on Linux, you can clone from that one file.

git clone myrepo.bundle
cd myrepo


Answered By - VonC
Answer Checked By - David Goodson (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing