【发布时间】:2014-02-04 04:52:26
【问题描述】:
我的 git 有一个简单的问题:
我在 github 上的存储库中有这个文件 inc.conf.php。 我不想从 repo 中删除他,这是一个基本的配置文件。
现在,在我的本地仓库中,我有相同的文件 inc.cong.php 和我自己的配置,我不希望这个文件被提交。
所以我创建了一个 .gitignore 并添加了 inc.config.php 。 (.gitignore 是提交并推送 repo)
但是当我在本地更新文件 inc.config.php 和磁带 git status 时:
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: Swindle-Foundation5/inc.config.php
no changes added to commit (use "git add" and/or "git commit -a")
但我不想从 github 更改存储库上的文件。 我该怎么做?
【问题讨论】:
标签: git github push gitignore git-commit