1

I am starting with android Rom development. The original author of the sources have uploaded it on github As of now i have used the repo tool of google to sync it from github to my local machine

How can i fork that repo without downloading it again?

Should i just go into that directory and execute after forked from github website?

$ git clone https://github.com/username/repo-name.git'

I cannot try it since the repo is still being synced.

Mihir Solanki
  • 288
  • 2
  • 11

2 Answers2

1

I think you can change git repo remote address

for example:

$ git remote rm origin
$ git remote add origin  git_forked_repo_address
Mihir Solanki
  • 288
  • 2
  • 11
lidashuang
  • 1,652
  • 1
  • 15
  • 18
1

You should:

  • rename the initial url remote name into upstream

    git remote rename origin upstream
    
  • add a new origin:

    git add origin https://YourLogin@github.com/YourLogin/yourFork
    

That way, you can still keep track of the original repo while pushing to your fork.

To illustrate that update process, see:

Community
  • 1
  • 1
VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283