0

Firstly, I got two questions to ask. My first question is I've downloaded repo tool for Windows and within Cygwin terminal used the below command

repo init -u https://github.com/CyanogenMod/android.git -b cm-14.0 --depth=1

to get CyanogenMod android source files and later used the below command repo sync .

Now I want to move my local repository and source files to another machine that runs on Ubuntu 14.04. How to achieve this? Does a simple simply copying of files will make the repo work on Ubuntu? I have very limited bandwidth for PC running ubuntu so I don't prefer to download the entire files again in Ubuntu.

Now my second question is, there is new branch cm-14.1 so how do I update my local branch on Ubuntu after moving the files?

Thanks a lot in advance.

Vy Do
  • 46,709
  • 59
  • 215
  • 313
Raj B6
  • 41
  • 3

1 Answers1

0

(Before all, you should fetch all branches to local machine, this is steps-by-steps tutorial: https://stackoverflow.com/a/40318872/3728901)

Use git bundle (for backup all branches)

A real example: On Windows OS PC

git clone --mirror https://github.com/donhuvy/personal_finance.git
cd personal_finance.git/
git bundle create repo.bundle --all

repo.bundle is the file what you need (full back up) in the same directory.

How to restore from file repo.bundle (On Ubuntu OS PC):

git clone repo.bundle

Reference

https://git-scm.com/docs/git-bundle

http://rypress.com/tutorials/git/tips-and-tricks#bundle-the-repository

Community
  • 1
  • 1
Vy Do
  • 46,709
  • 59
  • 215
  • 313