--- title: Git --- # Git ###### tags: `infrastructure` ## ignore 不生效 当.gitignore 文件配置好,往往不能失效。是因为 .gitignore 只能忽略那些没有被追踪的文件,因为 git 存在本地缓存,如果文件已经纳入了版本管理,那么修改 .gitignore 是不能失效的。那么解决方案就是要将 git 的本地缓存删除,然后重新提交。 git rm -r --cached . git add . git commit -m "update .gitignore" ## gitignore设置全局忽略.DS_Store文件 ## 重設遠端倉庫 git remote set-url origin ssh://git@git.qikqiak.com:30022/root/gitlab-ci-k8s-demo.git git push -u origin master
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up