can';我似乎没有用git提交文件

can';我似乎没有用git提交文件,git,Git,我不知道为什么,但我无法提交和推送我添加的新文件 $ git st # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # new file: css/clearfix.css # $ git push origin master Everything up-to-date $ git pull Already up-to-date

我不知道为什么,但我无法提交和推送我添加的新文件

$ git st
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#   new file:   css/clearfix.css
#


$ git push origin master
Everything up-to-date

$ git pull
Already up-to-date.
$git st
#论分行行长
#要提交的更改:
#(使用“git重置磁头…”取消分级)
#
#新文件:css/clearfix.css
#
$git推送原始主机
一切都是最新的
$git拉力
已经是最新的了。

您在屏幕上看到的是一个暂存文件

基本上,这意味着git知道您的更改,但它们还没有被持久化,这应该使用

git commit -m "Commit Message"

之后,如果愿意,您应该执行git push操作。

首先,您需要将新文件添加到git存储库:

git add css/clearfix.css
git commit css/clearfix.css
然后,您需要将文件提交到本地存储库:

git add css/clearfix.css
git commit css/clearfix.css

您现在可以推送更改了。

您只需将更改添加到临时区域。你还没做。使用
git commit-m“您的提交消息”
提交更改。有关更多详细信息,请参阅示例中的“您不提交”

您只需
推送
拉送
(两者都不是
提交
),是吗?它说已经添加了一个新文件。也许我没有使用正确的术语。如何将新文件推送到git repo?它已添加到后台,尚未提交。提交是使用
git Commit
执行的。“要提交的更改”