有时候多人维护项目.gitignore文件我们不想提交到代码仓库,但是我们修改了这个文件内容就会提示有变动当提交。那么如何取消和恢复这个文件的提示呢,命令如下:
取消.gitignore变动提示
git update-index –skip-worktree .gitignore
恢复.gitignore变动提示
git update-index –no-skip-worktree .gitignore
有时候多人维护项目.gitignore文件我们不想提交到代码仓库,但是我们修改了这个文件内容就会提示有变动当提交。那么如何取消和恢复这个文件的提示呢,命令如下:
git update-index –skip-worktree .gitignore
git update-index –no-skip-worktree .gitignore