“fetch --all” in a git bare repository doesn't synchronize local branches to the remote ones
- 阅读更多 关于 “fetch --all” in a git bare repository doesn't synchronize local branches to the remote ones
I'm trying to synchronize periodically a git bare repository, my local branches are created using the "--track" option. here is my config (without unnecessary things): [core] bare = true [remote "origin"] url = git@github.com:Ummon/D-LAN.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] remote = origin merge = refs/heads/master [branch "website"] remote = origin merge = refs/heads/website I must use the 'cp' command to update the local branches: git fetch --all cp -r refs/remotes/origin/* refs/heads Is there a more elegant solution? sehe Instead of copying the ref files around