git workflow - using one repo as the basis for another

后端 未结 1 485
面向向阳花
面向向阳花 2020-12-08 08:32

I\'ve forked the Paul Irish\'s HTML5 boilerplate on github so I can have my own version which better suits my needs. If I start every new web project with this boilerplate,

相关标签:
1条回答
  • 2020-12-08 08:50

    First, clone the skeleton repository:

    git clone ssh://git@github.com/user/proj.git new_proj
    

    Then, cd to the repo, and get rid of the origin remote:

    cd new_repo
    git remote rm origin
    

    And finally, create a new remote for the project (you may want to create a new project in github first):

    git remote add origin ssh://git@github.com/user/new_proj.git
    

    Now, when you do git push origin master, it should update the new project. You will still have the history of the original project. In fact, you can rename the initial origin to projbase or some such, you can even pick up changes to your skeleton (though that could make things a bit messy in terms of merges, and rebases are frowned upon once you push to github).

    0 讨论(0)
提交回复
热议问题