git mirror repository code example Example: git mirror repository cd myrepo git fetch origin git push --mirror