Skip to content

Instantly share code, notes, and snippets.

@kenyattaclark
Forked from mariozig/migrate_repo.sh
Created September 21, 2016 18:01
Show Gist options
  • Save kenyattaclark/1b911f9dde4d0f02705e952861adf76b to your computer and use it in GitHub Desktop.
Save kenyattaclark/1b911f9dde4d0f02705e952861adf76b to your computer and use it in GitHub Desktop.

Revisions

  1. @mariozig mariozig revised this gist Mar 24, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions migrate_repo.sh
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,8 @@
    # Assume we are in your home directory
    cd ~/

    # Clone the repo from GitLab using the `--bare` option
    $ git clone --bare [email protected]:mario/my-repo.git
    # Clone the repo from GitLab using the `--mirror` option
    $ git clone --mirror [email protected]:mario/my-repo.git

    # Change into newly created repo directory
    $ cd ~/my-repo.git
  2. @mariozig mariozig renamed this gist Mar 24, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. @mariozig mariozig renamed this gist Mar 24, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. @mariozig mariozig revised this gist Mar 24, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion git.sh
    Original file line number Diff line number Diff line change
    @@ -15,4 +15,4 @@ $ git remote set-url --push origin [email protected]:mario/my-repo.git

    # To periodically update the repo on GitHub with what you have in GitLab
    git fetch -p origin
    git push --mirror
    git push --no-verify --mirror
  5. @mariozig mariozig revised this gist Mar 24, 2015. 1 changed file with 4 additions and 5 deletions.
    9 changes: 4 additions & 5 deletions git.sh
    Original file line number Diff line number Diff line change
    @@ -4,16 +4,15 @@ cd ~/
    # Clone the repo from GitLab using the `--bare` option
    $ git clone --bare [email protected]:mario/my-repo.git

    # Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks.
    $ git push --no-verify --mirror [email protected]:mario/my-repo.git

    # Change into newly created repo directory
    $ cd ~/my-repo.git

    # Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks.
    $ git push --no-verify --mirror [email protected]:mario/my-repo.git

    # Set push URL to the mirror location
    $ git remote set-url --push origin [email protected]:mario/my-repo.git

    # Periodically update the repo on GitHub
    $ cd ~/my-repo.git
    # To periodically update the repo on GitHub with what you have in GitLab
    git fetch -p origin
    git push --mirror
  6. @mariozig mariozig revised this gist Mar 24, 2015. 1 changed file with 8 additions and 1 deletion.
    9 changes: 8 additions & 1 deletion git.sh
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,19 @@
    # Assume we are in your home directory
    cd ~/

    # Clone the repo from GitLab using the `--bare` option
    $ git clone --bare [email protected]:mario/my-repo.git

    # Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks.
    $ git push --no-verify --mirror [email protected]:mario/my-repo.git

    # Change into newly created repo directory
    $ cd my-repo.git
    $ cd ~/my-repo.git

    # Set push URL to the mirror location
    $ git remote set-url --push origin [email protected]:mario/my-repo.git

    # Periodically update the repo on GitHub
    $ cd ~/my-repo.git
    git fetch -p origin
    git push --mirror
  7. @mariozig mariozig revised this gist Mar 24, 2015. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions git.sh
    Original file line number Diff line number Diff line change
    @@ -4,3 +4,9 @@ $ git clone --bare [email protected]:mario/my-repo.git
    # Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks.
    $ git push --no-verify --mirror [email protected]:mario/my-repo.git

    # Change into newly created repo directory
    $ cd my-repo.git

    # Set push URL to the mirror location
    $ git remote set-url --push origin [email protected]:mario/my-repo.git

  8. @mariozig mariozig revised this gist Mar 23, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions git.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # Clone the repo from GitLab using the `--bare` option
    $ git clone --bare [email protected]:mario/my-repo.git

    # Push to GitHub using the `--mirror` option
    $ git push --mirror [email protected]:mario/my-repo.git
    # Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks.
    $ git push --no-verify --mirror [email protected]:mario/my-repo.git

  9. @mariozig mariozig created this gist Mar 23, 2015.
    6 changes: 6 additions & 0 deletions git.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    # Clone the repo from GitLab using the `--bare` option
    $ git clone --bare [email protected]:mario/my-repo.git

    # Push to GitHub using the `--mirror` option
    $ git push --mirror [email protected]:mario/my-repo.git