diff --git a/README.md b/README.md index 688d835..5abf7f3 100644 --- a/README.md +++ b/README.md @@ -169,6 +169,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`. * [Push a new local branch to remote repository and track](#push-a-new-local-branch-to-remote-repository-and-track) * [Change a branch base](#change-a-branch-base) * [Use SSH instead of HTTPs for remotes](#use-ssh-instead-of-https-for-remotes) +* [Duplicating a repository](#duplicating-a-repository) @@ -1191,5 +1192,11 @@ git rebase --onto git config --global url.'git@github.com:'.insteadOf 'https://github.com/' ``` +## Duplicating a repository +```sh +1) git clone --bare https://github.com/exampleuser/old-repository.git +2) git push --mirror https://github.com/exampleuser/new-repository.git +``` +