0

I got an issue on git and asked a question before, not resolved.

When I execute git push --mirror on my own git server, during its running, I push a commit to my git server, it accepted.

➜  ljmall git:(master) ✗ gp
Counting objects: 4, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 1.06 KiB | 1.06 MiB/s, done.
Total 4 (delta 3), reused 0 (delta 0)
To git.dmright.com:/opt/git/ljmall
   a436fdda3..88ceb916e  master -> master

After git push --mirror is done, I think I should push again because there should be one new commit on git server, but it told me Everything up-to-date

dejavu@ljhost-01:/opt/git/ljmall.git$ sudo -H -u git git push --mirror
Everything up-to-date

Then I run git pull --rebase on my development machine, my last commit is forced update.

Saved working directory and index state WIP on master: 88ceb916e feat: resources
From git.dmright.com:/opt/git/ljmall
 + 88ceb916e...a436fdda3 master     -> origin/master  (forced update)
dawncold
  • 183
  • 1
  • 1
  • 12
  • It's a designed behavior of `--mirror`, described in the manual of `git push`. – ElpieKay May 30 '18 at 01:41
  • but it removed my commit on git server instead of on mirror server, if I commit to the mirror server, it is removed after git push --mirror, it makes sense. – dawncold May 30 '18 at 01:53

0 Answers0