20210115关于git push all和 mirror的区别 - ziyouzy/2021blog GitHub Wiki

关于git push --all与git push --mirror之间的区别,这篇文章解释的太好了:

https://stackoverflow.com/questions/49343025/git-push-all-vs-mirror

--all
Push all branches (i.e. refs under refs/heads/); cannot be used with other <refspec>.
--mirror
... specifies that all refs under refs/ (which includes but is not limited to refs/heads/, refs/remotes/, and refs/tags/) be mirrored ...

解释简单明了,我需要的时mirror但是我想看一下refs目录目前都有什么:

zqy@ubuntu:~/WorkShop/golang/src/yunhuan_mylib/.git/refs$ ls
    heads  remotes  tags

    zqy@ubuntu:~/WorkShop/golang/src/yunhuan_mylib/.git/refs/heads$ ls
        buildService  master  snmpconn

    zqy@ubuntu:~/WorkShop/golang/src/yunhuan_mylib/.git/refs/remotes$ ls
        origin

    zqy@ubuntu:~/WorkShop/golang/src/yunhuan_mylib/.git/refs/tags$ ls
        (null)

嗯,我需要的是--mirror

⚠️ **GitHub.com Fallback** ⚠️