我得到了~/bin的身份:
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# screen/dev/
我跑
git add --force screen/dev/
我得到了和以前一样的身份。我独立地在文件夹中添加每个文件,但是我得到相同的git-状态。
屏幕/dev/中没有.git。这个文件夹似乎不是一个总和。
如何将文件夹及其内容强制添加到我的git中?
我创建了一个新的存储库。将其克隆到我的电脑中的文件夹中。然后在该文件夹中创建一个txt文件。当我尝试推送此更改时,$git push不起作用。即使它也不会产生任何错误消息。顺便说一下,我正在使用gitbash。 我卸载了gitbash,然后重新安装,但没有任何变化。 代码如下: ~/Desktop/duke/890_r/final_project (main)
$ git status
On branch main
Your branch is ahead of 'origin/main' by 5 commits.
(use "git push" to
我有一些文件/文件夹不会离开Git暂存区?
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
# (commit or discard the untracked or modified content in sub
我的.gitignore文件如下:
$ cat .gitignore
Index/
Index/LOG
我将.gitignore文件添加到回购、提交甚至推送中。但是git status永久地显示:
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in
当我执行$ git状态时,git会显示文件夹(除了文件)。它看起来类似于这样:
$ git status
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)
example.folder1/
example.folder2.subfolder1/
folder3/bar.c
folder3/bar.h
foo.c
foo.h
目前,没有跟踪的文件(但是它们包含被忽略的文件)