Sharing files across branches in Git

后端 未结 6 1746

There are a bunch of files in my project that are sometimes modified but always shared among many different branches. Examples include build scripts, batch files that include p

6条回答
  •  野的像风
    2021-02-07 05:54

    You can achieve the same affect as .gitignore files by setting the skip-worktree bit of tracked files.

    git update-index --skip-worktree 
    

    Git will now pretend that your files are up-to-date.

提交回复
热议问题