美文网首页程序人生
Android Studio的.gitignore以及gitig

Android Studio的.gitignore以及gitig

作者: 为自己代颜_ | 来源:发表于2019-05-07 21:11 被阅读2次

    添加.gitignore文件后并没有忽略我们想要忽略的文件,解决方法就是清除一下缓存,原因gitignore对已经追踪(track)的文件无效,清除缓存后文件将以未追踪的形式出现.然后再重新添加提交一下,.gitignore文件里的规则就可以起作用了

    1. git rm -r --cached .

    2. git add .

    3. git commit -m 'update .gitignore'

    4. git push -u origin master (如果有远程仓库则使用)

    相关文章

      网友评论

        本文标题:Android Studio的.gitignore以及gitig

        本文链接:https://www.haomeiwen.com/subject/exkuoqtx.html