How to manage an isolated project from a fork?

I've forked a project on Github. Now I want to contribute to the forked repo as well as develop an in-house application using that same repo.

The in-house application strips off several lines of code that isn't required. In house-app should be managed as a branch, fork or a clone ?

As far as I understood, fork is a github-to-github copy of a repo. Clone is a local copy of a github repo. Not sure what are branches... but adding a branch does not make a new local copy (when git is installed.)


There is a difference between all of the three: fork, clone and branch .

  • Fork : After you have forked a repo then you are the owner of the forked repo. You can do whatever you want.

  • Clone : Cloning a repo makes that repo available to you. Remember, you can add multiple remotes after cloning a repo So it depends on you on which remote you are working.

  • Branch : Branching does not create any new repo. A branch contains a series of commits. Generally branching is used when we work on two(or more) things simultaneously. Like fixing a bug and developing a new feature.

  • If you want to manage a forked repo independently, you can always do that. As I said, you are the owner of the forked repo now. Just clone the forked repo again at different location and do your things.

    Or, get all the code from the forked repo, over-write the existing git history by creating a new repository and push it with another name.


    The best way is to make a branch and have a separate clone of master and the branch.

    Clone a specific branch using:

    git clone -b my-branch https://git@github.com/username/myproject.git

    Reference: https://stackoverflow.com/a/4568323/1331135

    链接地址: http://www.djcxy.com/p/16052.html

    上一篇: Github在视觉工作室2013恢复

    下一篇: 如何从叉子管理一个孤立的项目?