Changing a directory structure in Mercurial

前端 未结 2 1589
暖寄归人
暖寄归人 2021-01-05 16:40

I have a single-person single-folder mercurial repository. The directory structure is simple:

P104
  lecture_notes
    files under version control live here         


        
2条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-05 17:14

    If the root directory of your Mercurial repo is under ~/P104/lecture_notes, I would rather:

    1. rename lecture_notes into P104
    2. make a subdirectory lecture_notes
    3. move all the existing files in that new sub-directory
    4. add homework and its files in the renamed P104 directory
    5. hg add everything

    The idea is to keep the .hg repo where it is (~/P104/lecture_notes renamed into ~/P104/P104) and reorganize the files within that renamed directory.
    No need to clone.

提交回复
热议问题