Is there a way to lock individual files or directories on fork when using git?

后端 未结 8 1423
孤独总比滥情好
孤独总比滥情好 2020-11-30 02:47

We are a team of 60+ developers working on the same product and are moving from SVN to Git and GitHub. We have a process in SVN where in individual files are locked and when

8条回答
  •  不知归路
    2020-11-30 03:29

    If you are using git LFS (which is supported by some git hosting providers, like GitHub) you could use File Locking.

    Mark a file type as lockable by editing the .gitattributes file:

    *.docx lockable
    # Make MS Word files lockable
    

    And lock it with:

    $ git lfs lock example.docx
    

    You can unlock your files with git lfs unlock example.docx and those of somebody else by adding --force.

提交回复
热议问题