I am currently studying qgroundcontrol open source.
According to the qgroundcontrol developer guide, it says
"Create a new repository from main QGC repo. Do not clone, create a new repo, initializing it from the main QGC repo."
(https://dev.qgroundcontrol.com/en/custom_build/upstream_merge.html)
But I only know how to clone and fork the repository.
So, I wonder how I can create a new repository from the main one so that I can modify and test code from my repository.
create new repository from an existing one
400 Views Asked by April Kim AtThere are 3 best solutions below

Welcome to Stackoverflow :) As I see they are telling you to do some thing like this.
$ mkdir newRepo
$ cd newRepo
$ git init
Create a new repository in you GitHub account
$ git remote add origin https://github.com/yourusername/reponame.git
$ git remote add mavlink https://github.com/mavlink/qgroundcontrol.git
$ git pull mavlink
$ git push origin master
They are trying to tell you how to update your repo with new features they add to the main repo.
The same thing can be done using forking.As I understood, To follow this tutorial you will have to follow this way.

According to the doc author, you can clone, fork, or whatever you like to take a copy.
The intent of this was to make sure that downstream custom changes to the custom-example are not included when submitting any PR against upstream QGC. As long as you avoid that, you can do it however you like.
Note: The "custom-example" is part of upstream QGC. Changes sent there are meant to continue showing things that can be done by "plugins" and not something specific to new, custom code that are only relevant to someone's custom version.
The text will but updated soon.
I'd say that author thought about: