Skip to content

Instantly share code, notes, and snippets.

@1c7
Created February 10, 2019 10:15
Show Gist options
  • Select an option

  • Save 1c7/06355db3a77141c68772df743cb84080 to your computer and use it in GitHub Desktop.

Select an option

Save 1c7/06355db3a77141c68772df743cb84080 to your computer and use it in GitHub Desktop.

Revisions

  1. 1c7 created this gist Feb 10, 2019.
    11 changes: 11 additions & 0 deletions git-command.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    ## to Gitlab
    cd existing_repo
    git remote rename origin old-origin
    git remote add origin git@gitlab.com:1c7/empty.git
    git push -u origin --all
    git push -u origin --tags

    ## Gitlab back to Github
    cd existing_repo
    git remote rm origin
    git remote rename old-origin origin