這是當我試圖複製
[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