How can I start a clean branch with no ancestry, then commit files progressively?

后端 未结 3 1768
清歌不尽
清歌不尽 2020-12-12 19:22

I have a PHP framework versioned with GIT and I\'m planning several (drastic) changes to its core.

What I want to do is to start working on the new core in a new br

3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-12 19:31

    If you must work with an old version of git:

     mkdir some_dir
     cd some_dir
     git init
     echo a>some_file; git add some_file; git commit -m 'initial commit'
     cd ..
     git fetch ./some_dir/ master:new_independent_branch
     rm -rf some_dir
    

提交回复
热议问题