相关疑难解决方法(0)

如何撤消Git中最近的提交?

我不小心将错误的文件提交给Git,但我还没有将提交推送到服务器.

如何从本地存储库中撤消这些提交?

git version-control undo pre-commit git-commit

2万
推荐指数
103
解决办法
826万
查看次数

.gitignore被Git忽略了

我的.gitignore文件似乎被Git忽略了 - 该.gitignore文件可能已损坏吗?Git期望哪种文件格式,语言环境或文化?

我的.gitignore:

# This is a comment
debug.log
nbproject/
Run Code Online (Sandbox Code Playgroud)

输出来自git status:

# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#       debug.log
#       nbproject/
nothing added to commit but untracked files present (use "git add" to track)
Run Code Online (Sandbox Code Playgroud)

我想,debug.lognbproject/不是出现在未跟踪的文件列表中.

我应该从哪里开始寻找解决方法呢?

git gitignore

1407
推荐指数
20
解决办法
72万
查看次数

标签 统计

git ×2

git-commit ×1

gitignore ×1

pre-commit ×1

undo ×1

version-control ×1