我的更改没有推送到我的主存储库
my changes did not got pushed to my master repository
我有一个仓库
当我第一次创建时,我可以从我的本地机器上推送。
通过 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'.
现在我从网络界面上查看了。我很惊讶没有推送任何更改我的意思是文件 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'.
但是我通过网络界面访问的文件也没有变化。
那么现在我该怎么办?我在这里做错了吗?
更新1
正如这里评论中提到的
$ 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 add -A
进行所有这些修改。如果此时您执行 git status
,那么在文本 Changes to be committed:
下方,您应该会看到您的文件已列出。
git commit -m "Your commit message goes here"
来提交这些更改(替换为合理的提交消息 ofc)。这将在您的本地存储库中提交这些更改。如果此时执行 git status
,您应该会看到输出 nothing to commit, working tree clean
.
git push
将您的更改推送到远程。
我有一个仓库
当我第一次创建时,我可以从我的本地机器上推送。
通过 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'.
现在我从网络界面上查看了。我很惊讶没有推送任何更改我的意思是文件 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'.
但是我通过网络界面访问的文件也没有变化。 那么现在我该怎么办?我在这里做错了吗?
更新1
正如这里评论中提到的
$ 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 add -A
进行所有这些修改。如果此时您执行git status
,那么在文本Changes to be committed:
下方,您应该会看到您的文件已列出。git commit -m "Your commit message goes here"
来提交这些更改(替换为合理的提交消息 ofc)。这将在您的本地存储库中提交这些更改。如果此时执行git status
,您应该会看到输出nothing to commit, working tree clean
.git push
将您的更改推送到远程。