Fake forking your own repo for maintainability purposeHow to selectively merge or pick changes from another branch in Git?Git workflow and rebase vs merge questionsHow to merge a specific commit in GitWhy does git perform fast-forward merges by default?Merge all changes from another branch as a single commitCreate a branch in Git from another branchWhat is the best (and safest) way to merge a Git branch into master?Git fetch remote branchDelete forked repo from GitHubGit merge master into feature branch

How would I stat a creature to be immune to everything but the Magic Missile spell? (just for fun)

How badly should I try to prevent a user from XSSing themselves?

Zip/Tar file compressed to larger size?

Intersection Puzzle

How do I deal with an unproductive colleague in a small company?

Do UK voters know if their MP will be the Speaker of the House?

Is it inappropriate for a student to attend their mentor's dissertation defense?

ssTTsSTtRrriinInnnnNNNIiinngg

How does a predictive coding aid in lossless compression?

Unlock My Phone! February 2018

Why didn't Boeing produce its own regional jet?

How do I gain back my faith in my PhD degree?

How seriously should I take size and weight limits of hand luggage?

Can I run a new neutral wire to repair a broken circuit?

Assassin's bullet with mercury

What mechanic is there to disable a threat instead of killing it?

Why is consensus so controversial in Britain?

Should I cover my bicycle overnight while bikepacking?

What is a romance in Latin?

Can a virus destroy the BIOS of a modern computer?

Is there a hemisphere-neutral way of specifying a season?

What does “the session was packed” mean in this context?

Is it logically or scientifically possible to artificially send energy to the body?

How did the Super Star Destroyer Executor get destroyed exactly?



Fake forking your own repo for maintainability purpose


How to selectively merge or pick changes from another branch in Git?Git workflow and rebase vs merge questionsHow to merge a specific commit in GitWhy does git perform fast-forward merges by default?Merge all changes from another branch as a single commitCreate a branch in Git from another branchWhat is the best (and safest) way to merge a Git branch into master?Git fetch remote branchDelete forked repo from GitHubGit merge master into feature branch













2















I am not sure how to precisely describe the issue so I will use an example, say i have the following:




  • RepoA - original repo with some base code, libs, framework, folder structure, etc


  • RepoB - ideally a fork/branch... but can't fork your own repos and I want a separate repo, so branch doesn't work

The goal is to work on RepoB and be able to merge changes that have been made inside RepoA into the code, so if a new feature is developed on RepoA I can just merge it into the RepoB and continue development. Essentially it is a "branch" of a different repo.



Is this somehow possible?



I've also thought of maybe somehow using NPM to get this functionality but I am not sure at all how to/how it works with NPM, all my work on company projects would have a single repo and feature branches, so I've never encountered this problem.



EDIT: As per comments



The idea is to setup a repo structure with all the things that I commonly use in multiple projects, such as boilerplate, UI components, blank server, router configurations, basically create a "framework" that has no features, other than being a "work environment" that can be built upon.



Then, for each project, i'd create a specific repo and drag in the framework, for lack of the better words. But I want to be able to "merge" additional things that might get added to framework at a later point into the repo.



I do not want to branch this framework repo because I want the repositories on github to be separate. I'd be fine with somehow adding some form of dependency, or even use NPM, but I do not know how would I use NPM for this.










share|improve this question



















  • 6





    I fail to see how a forked repository would serve you better than a branch would in that case...

    – ccjmne
    Mar 7 at 22:56






  • 1





    @Dellirium Maybe describe what problem you think you would have with a single repo. (@ccjmne Agreed.)

    – RomainValeri
    Mar 7 at 23:04












  • @ccjmne edited the post to reflect

    – Dellirium
    Mar 8 at 0:33











  • At least for github you can set up a separate organization and fork from your own repos into the org. I've used that myself while testing out some experimental CI solutions while not bogging down builds.

    – Anthony Sottile
    Mar 8 at 1:12






  • 1





    @Tony thanks for the reminder, totally forgot, been a loooong night

    – Dellirium
    Mar 9 at 17:30















2















I am not sure how to precisely describe the issue so I will use an example, say i have the following:




  • RepoA - original repo with some base code, libs, framework, folder structure, etc


  • RepoB - ideally a fork/branch... but can't fork your own repos and I want a separate repo, so branch doesn't work

The goal is to work on RepoB and be able to merge changes that have been made inside RepoA into the code, so if a new feature is developed on RepoA I can just merge it into the RepoB and continue development. Essentially it is a "branch" of a different repo.



Is this somehow possible?



I've also thought of maybe somehow using NPM to get this functionality but I am not sure at all how to/how it works with NPM, all my work on company projects would have a single repo and feature branches, so I've never encountered this problem.



EDIT: As per comments



The idea is to setup a repo structure with all the things that I commonly use in multiple projects, such as boilerplate, UI components, blank server, router configurations, basically create a "framework" that has no features, other than being a "work environment" that can be built upon.



Then, for each project, i'd create a specific repo and drag in the framework, for lack of the better words. But I want to be able to "merge" additional things that might get added to framework at a later point into the repo.



I do not want to branch this framework repo because I want the repositories on github to be separate. I'd be fine with somehow adding some form of dependency, or even use NPM, but I do not know how would I use NPM for this.










share|improve this question



















  • 6





    I fail to see how a forked repository would serve you better than a branch would in that case...

    – ccjmne
    Mar 7 at 22:56






  • 1





    @Dellirium Maybe describe what problem you think you would have with a single repo. (@ccjmne Agreed.)

    – RomainValeri
    Mar 7 at 23:04












  • @ccjmne edited the post to reflect

    – Dellirium
    Mar 8 at 0:33











  • At least for github you can set up a separate organization and fork from your own repos into the org. I've used that myself while testing out some experimental CI solutions while not bogging down builds.

    – Anthony Sottile
    Mar 8 at 1:12






  • 1





    @Tony thanks for the reminder, totally forgot, been a loooong night

    – Dellirium
    Mar 9 at 17:30













2












2








2


1






I am not sure how to precisely describe the issue so I will use an example, say i have the following:




  • RepoA - original repo with some base code, libs, framework, folder structure, etc


  • RepoB - ideally a fork/branch... but can't fork your own repos and I want a separate repo, so branch doesn't work

The goal is to work on RepoB and be able to merge changes that have been made inside RepoA into the code, so if a new feature is developed on RepoA I can just merge it into the RepoB and continue development. Essentially it is a "branch" of a different repo.



Is this somehow possible?



I've also thought of maybe somehow using NPM to get this functionality but I am not sure at all how to/how it works with NPM, all my work on company projects would have a single repo and feature branches, so I've never encountered this problem.



EDIT: As per comments



The idea is to setup a repo structure with all the things that I commonly use in multiple projects, such as boilerplate, UI components, blank server, router configurations, basically create a "framework" that has no features, other than being a "work environment" that can be built upon.



Then, for each project, i'd create a specific repo and drag in the framework, for lack of the better words. But I want to be able to "merge" additional things that might get added to framework at a later point into the repo.



I do not want to branch this framework repo because I want the repositories on github to be separate. I'd be fine with somehow adding some form of dependency, or even use NPM, but I do not know how would I use NPM for this.










share|improve this question
















I am not sure how to precisely describe the issue so I will use an example, say i have the following:




  • RepoA - original repo with some base code, libs, framework, folder structure, etc


  • RepoB - ideally a fork/branch... but can't fork your own repos and I want a separate repo, so branch doesn't work

The goal is to work on RepoB and be able to merge changes that have been made inside RepoA into the code, so if a new feature is developed on RepoA I can just merge it into the RepoB and continue development. Essentially it is a "branch" of a different repo.



Is this somehow possible?



I've also thought of maybe somehow using NPM to get this functionality but I am not sure at all how to/how it works with NPM, all my work on company projects would have a single repo and feature branches, so I've never encountered this problem.



EDIT: As per comments



The idea is to setup a repo structure with all the things that I commonly use in multiple projects, such as boilerplate, UI components, blank server, router configurations, basically create a "framework" that has no features, other than being a "work environment" that can be built upon.



Then, for each project, i'd create a specific repo and drag in the framework, for lack of the better words. But I want to be able to "merge" additional things that might get added to framework at a later point into the repo.



I do not want to branch this framework repo because I want the repositories on github to be separate. I'd be fine with somehow adding some form of dependency, or even use NPM, but I do not know how would I use NPM for this.







git github






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 8 at 1:06







Dellirium

















asked Mar 7 at 22:52









DelliriumDellirium

718819




718819







  • 6





    I fail to see how a forked repository would serve you better than a branch would in that case...

    – ccjmne
    Mar 7 at 22:56






  • 1





    @Dellirium Maybe describe what problem you think you would have with a single repo. (@ccjmne Agreed.)

    – RomainValeri
    Mar 7 at 23:04












  • @ccjmne edited the post to reflect

    – Dellirium
    Mar 8 at 0:33











  • At least for github you can set up a separate organization and fork from your own repos into the org. I've used that myself while testing out some experimental CI solutions while not bogging down builds.

    – Anthony Sottile
    Mar 8 at 1:12






  • 1





    @Tony thanks for the reminder, totally forgot, been a loooong night

    – Dellirium
    Mar 9 at 17:30












  • 6





    I fail to see how a forked repository would serve you better than a branch would in that case...

    – ccjmne
    Mar 7 at 22:56






  • 1





    @Dellirium Maybe describe what problem you think you would have with a single repo. (@ccjmne Agreed.)

    – RomainValeri
    Mar 7 at 23:04












  • @ccjmne edited the post to reflect

    – Dellirium
    Mar 8 at 0:33











  • At least for github you can set up a separate organization and fork from your own repos into the org. I've used that myself while testing out some experimental CI solutions while not bogging down builds.

    – Anthony Sottile
    Mar 8 at 1:12






  • 1





    @Tony thanks for the reminder, totally forgot, been a loooong night

    – Dellirium
    Mar 9 at 17:30







6




6





I fail to see how a forked repository would serve you better than a branch would in that case...

– ccjmne
Mar 7 at 22:56





I fail to see how a forked repository would serve you better than a branch would in that case...

– ccjmne
Mar 7 at 22:56




1




1





@Dellirium Maybe describe what problem you think you would have with a single repo. (@ccjmne Agreed.)

– RomainValeri
Mar 7 at 23:04






@Dellirium Maybe describe what problem you think you would have with a single repo. (@ccjmne Agreed.)

– RomainValeri
Mar 7 at 23:04














@ccjmne edited the post to reflect

– Dellirium
Mar 8 at 0:33





@ccjmne edited the post to reflect

– Dellirium
Mar 8 at 0:33













At least for github you can set up a separate organization and fork from your own repos into the org. I've used that myself while testing out some experimental CI solutions while not bogging down builds.

– Anthony Sottile
Mar 8 at 1:12





At least for github you can set up a separate organization and fork from your own repos into the org. I've used that myself while testing out some experimental CI solutions while not bogging down builds.

– Anthony Sottile
Mar 8 at 1:12




1




1





@Tony thanks for the reminder, totally forgot, been a loooong night

– Dellirium
Mar 9 at 17:30





@Tony thanks for the reminder, totally forgot, been a loooong night

– Dellirium
Mar 9 at 17:30












1 Answer
1






active

oldest

votes


















1














So after some fiddling around with what Mohana Rao suggested I've managed to get what I need.



One-time-use



We are doing all our work inside RepoB, say, on a master branch:



git remote add base <link-to-RepoA>
git checkout -b new-feature-import
git pull base master --allow-unrelated-histories
git checkout master
git merge new-feature-import
git branch -D new-feature-import


Saving for future usage:



git remote add base <link-to-RepoA>
git fetch base
git checkout -b base-integration
git branch --set-upstream-to=base/master
git pull --allow-unrelated-histories
git checkout master
git merge base-integration


With the second method allowing you to switch to a branch at a later point and just do a pull to get the latest changes. Obviously any merge conflicts you'd have to resolve and obviously you should not be pushing from the base-integration branch back to your RepoA if you opt to go with this "more convenient" solution.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55054083%2ffake-forking-your-own-repo-for-maintainability-purpose%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    So after some fiddling around with what Mohana Rao suggested I've managed to get what I need.



    One-time-use



    We are doing all our work inside RepoB, say, on a master branch:



    git remote add base <link-to-RepoA>
    git checkout -b new-feature-import
    git pull base master --allow-unrelated-histories
    git checkout master
    git merge new-feature-import
    git branch -D new-feature-import


    Saving for future usage:



    git remote add base <link-to-RepoA>
    git fetch base
    git checkout -b base-integration
    git branch --set-upstream-to=base/master
    git pull --allow-unrelated-histories
    git checkout master
    git merge base-integration


    With the second method allowing you to switch to a branch at a later point and just do a pull to get the latest changes. Obviously any merge conflicts you'd have to resolve and obviously you should not be pushing from the base-integration branch back to your RepoA if you opt to go with this "more convenient" solution.






    share|improve this answer



























      1














      So after some fiddling around with what Mohana Rao suggested I've managed to get what I need.



      One-time-use



      We are doing all our work inside RepoB, say, on a master branch:



      git remote add base <link-to-RepoA>
      git checkout -b new-feature-import
      git pull base master --allow-unrelated-histories
      git checkout master
      git merge new-feature-import
      git branch -D new-feature-import


      Saving for future usage:



      git remote add base <link-to-RepoA>
      git fetch base
      git checkout -b base-integration
      git branch --set-upstream-to=base/master
      git pull --allow-unrelated-histories
      git checkout master
      git merge base-integration


      With the second method allowing you to switch to a branch at a later point and just do a pull to get the latest changes. Obviously any merge conflicts you'd have to resolve and obviously you should not be pushing from the base-integration branch back to your RepoA if you opt to go with this "more convenient" solution.






      share|improve this answer

























        1












        1








        1







        So after some fiddling around with what Mohana Rao suggested I've managed to get what I need.



        One-time-use



        We are doing all our work inside RepoB, say, on a master branch:



        git remote add base <link-to-RepoA>
        git checkout -b new-feature-import
        git pull base master --allow-unrelated-histories
        git checkout master
        git merge new-feature-import
        git branch -D new-feature-import


        Saving for future usage:



        git remote add base <link-to-RepoA>
        git fetch base
        git checkout -b base-integration
        git branch --set-upstream-to=base/master
        git pull --allow-unrelated-histories
        git checkout master
        git merge base-integration


        With the second method allowing you to switch to a branch at a later point and just do a pull to get the latest changes. Obviously any merge conflicts you'd have to resolve and obviously you should not be pushing from the base-integration branch back to your RepoA if you opt to go with this "more convenient" solution.






        share|improve this answer













        So after some fiddling around with what Mohana Rao suggested I've managed to get what I need.



        One-time-use



        We are doing all our work inside RepoB, say, on a master branch:



        git remote add base <link-to-RepoA>
        git checkout -b new-feature-import
        git pull base master --allow-unrelated-histories
        git checkout master
        git merge new-feature-import
        git branch -D new-feature-import


        Saving for future usage:



        git remote add base <link-to-RepoA>
        git fetch base
        git checkout -b base-integration
        git branch --set-upstream-to=base/master
        git pull --allow-unrelated-histories
        git checkout master
        git merge base-integration


        With the second method allowing you to switch to a branch at a later point and just do a pull to get the latest changes. Obviously any merge conflicts you'd have to resolve and obviously you should not be pushing from the base-integration branch back to your RepoA if you opt to go with this "more convenient" solution.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 9 at 17:30









        DelliriumDellirium

        718819




        718819





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55054083%2ffake-forking-your-own-repo-for-maintainability-purpose%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

            Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

            Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved