我的更改未推送到我的主存储库中

问题描述 投票:0回答:1

我有一个存储库第一次创建时可以从本地计算机上推送。通过执行git push -u origin master我不断在文件中进行更改,现在我做了

$ git commit -m "bibliography changes in .bib file"
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
        modified:   BIBeusflat2019.bib
        modified:   EUSFLAT2019_template.aux
        modified:   EUSFLAT2019_template.bbl
        modified:   EUSFLAT2019_template.blg
        modified:   EUSFLAT2019_template.log
        modified:   EUSFLAT2019_template.pdf
        modified:   EUSFLAT2019_template.synctex.gz
        modified:   EUSFLAT2019_template.tex

no changes added to commit

然后我做了

$ git push -u origin master
Everything up-to-date
Branch 'master' set up to track remote branch 'master' from 'origin'.

现在我已经从Web界面检查了。我很惊讶没有推送任何更改,我的意思是文件modified: EUSFLAT2019_template.bbl是我进行更改的文件,因此我希望其中的书目条目会更改。但这就像我第一次推它一样。

然后我尝试了

$ git add -A
warning: LF will be replaced by CRLF in BIBeusflat2019.bib.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in EUSFLAT2019_template.aux.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in EUSFLAT2019_template.log.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in EUSFLAT2019_template.tex.
The file will have its original line endings in your working directory

然后是>>

$ git push -u origin master
Everything up-to-date
Branch 'master' set up to track remote branch 'master' from 'origin'.

但是我通过Web界面访问的文件也没有变化。所以现在我该怎么办?我在这里犯错了吗?

update1

正如评论中提到的是
$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        modified:   BIBeusflat2019.bib
        modified:   EUSFLAT2019_template.aux
        modified:   EUSFLAT2019_template.bbl
        modified:   EUSFLAT2019_template.blg
        modified:   EUSFLAT2019_template.log
        modified:   EUSFLAT2019_template.pdf
        modified:   EUSFLAT2019_template.synctex.gz
        modified:   EUSFLAT2019_template.tex

现在我检查

$ git log
commit 04a1e28b5e47b35275c15e72886a22885eec9b1d (HEAD -> master, origin/master)
Author: asaad
Date:   Sun Mar 29 02:31:16 2020 +0530

    29-3-2020

commit eff88becc48786dc379cf138199bd04314052533
Author: asadd
Date:   Sun Mar 29 02:29:42 2020 +0530

    first commit

update2

根据答案,我更改了项目的README.md以确保满足答案中的要求,因此现在我再次执行
$ git add -A
warning: LF will be replaced by CRLF in README.md.
The file will have its original line endings in your working directory

然后我做了

$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        modified:   BIBeusflat2019.bib
        modified:   EUSFLAT2019_template.aux
        modified:   EUSFLAT2019_template.bbl
        modified:   EUSFLAT2019_template.blg
        modified:   EUSFLAT2019_template.log
        modified:   EUSFLAT2019_template.pdf
        modified:   EUSFLAT2019_template.synctex.gz
        modified:   EUSFLAT2019_template.tex
        modified:   README.md

然后

$ git commit -m "third change Readme.md"
[master acdc9be] third change Readme.md
 9 files changed, 243 insertions(+), 247 deletions(-)
 rewrite EUSFLAT2019_template.synctex.gz (84%)

现在我又做了一次

$ $ git status
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean
bash: $: command not found

现在又做了

$ git push -u origin master
Enumerating objects: 21, done.
Counting objects: 100% (21/21), done.
Delta compression using up to 4 threads
Compressing objects: 100% (11/11), done.
Writing objects: 100% (11/11), 130.34 KiB | 4.83 MiB/s, done.
Total 11 (delta 8), reused 0 (delta 0)
remote: Resolving deltas: 100% (8/8), completed with 8 local objects.
To https://github.com/kiotie32/firstpaper.git
   04a1e28..acdc9be  master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.

现在我做了

$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

我有一个可以在第一次创建时从本地计算机推送的存储库。通过执行git push -u origin master,我不断在文件中进行更改,现在我执行了$ git commit -m“ ...

git push git-bash master
1个回答
0
投票

似乎您已尝试在暂存(添加)文件之前提交文件。您需要先暂存更改,然后提交更改,最后将此提交推送到远程。要修复:

© www.soinside.com 2019 - 2024. All rights reserved.