这是当我试图复制
[email protected] MINGW64 /c (11.1.0)
$ git pull
Already up-to-date.
混帐拉是成功的,我做了一个改变我的文件会发生什么。
[email protected] MINGW64 /c (11.1.0)
$ git push
Everything up-to-date
什么都没有发现。
[email protected] MINGW64 /c (11.1.0)
$ git status
On branch 11.1.0
Your branch is up-to-date with 'origin/11.1.0'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: ReleaseNotes/Release_Notes_11.1.0.docx
no changes added to commit (use "git add" and/or "git commit -a")
当我这样做,它已查明变化
[email protected] MINGW64 /c (11.1.0)
$ git add .
增加了对提交文件git的状态。
[email protected] MINGW64 /c (11.1.0)
$ git push
Everything up-to-date
,没有什么是看准
[email protected] MINGW64 /c (11.1.0)
$ git status
On branch 11.1.0
Your branch is up-to-date with 'origin/11.1.0'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: ReleaseNotes/Release_Notes_11.1.0.docx
状态已经确定了变化
[email protected] MINGW64 /c (11.1.0)
$ git commit -m 'Release notes amended'
[11.1.0 28697fa] Release notes amended
1 file changed, 0 insertions(+), 0 deletions(-)
rewrite ReleaseNotes/Release_Notes_11.1.0.docx (62%)
本地提交
[email protected] MINGW64 /c (11.1.0)
$ git push
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 50.57 KiB | 0 bytes/s, done.
Total 4 (delta 0), reused 0 (delta 0)
remote:
remote: Create pull request for 11.1.0:
remote: https://bitbucket.org/URL
remote:
To bitbucket.org:Project/repo.git
7db5eb6..28697fa 11.1.0 -> 11.1.0
现在推的是成功的。
就你而言,当你应用推送时,肯定有一些本地提交的更改。
你的问题最好含糊不清。如果你没有做一个本地提交,push什么也不做。 –
@AbhijitSarkar这也是我的一般感受。我尝试了一个答案,试图解释如果一个推动实际上通过了可能发生的事情。 –
也许你的IDE自动提交你的代码。使用'git log'或'git reflog'来找出发生的事情。 – haolee