Skip to content

Instantly share code, notes, and snippets.

@lambdaydoty
Created December 14, 2021 14:23
Show Gist options
  • Select an option

  • Save lambdaydoty/069a4b581fd9a0b7db87cf64a95c1fd5 to your computer and use it in GitHub Desktop.

Select an option

Save lambdaydoty/069a4b581fd9a0b7db87cf64a95c1fd5 to your computer and use it in GitHub Desktop.

Revisions

  1. @moose-horizons moose-horizons revised this gist Nov 14, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion copy-repo.md
    Original file line number Diff line number Diff line change
    @@ -20,7 +20,7 @@ Useful for starter code.
    ```

    1. Create a new repository for your project on GitHub
    1. Add push your repository to GitHub
    1. Push your code to the new repository you just created

    ```
    git remote add origin git-url-of-the-new-repo-you-created
  2. @moose-horizons moose-horizons revised this gist Nov 14, 2017. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions copy-repo.md
    Original file line number Diff line number Diff line change
    @@ -8,6 +8,7 @@ Useful for starter code.
    ```sh
    cd where-you-keep-your-projects
    mkdir your-project-name
    cd your-project-name
    git init
    ```

  3. @moose-horizons moose-horizons created this gist Nov 14, 2017.
    27 changes: 27 additions & 0 deletions copy-repo.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    # How to copy a GitHub repo without forking

    GitHub only lets you fork a repo once, if you want to make more than one copy of a project here's how you can do it.
    Useful for starter code.

    1. Create a new empty folder for your project and initialize git

    ```sh
    cd where-you-keep-your-projects
    mkdir your-project-name
    git init
    ```

    1. "Pull" the repo you want to copy:

    ```sh
    # git url is the same as the clone URL
    git pull git-url-of-the-repo-you-want-to-copy
    ```

    1. Create a new repository for your project on GitHub
    1. Add push your repository to GitHub

    ```
    git remote add origin git-url-of-the-new-repo-you-created
    git push -u origin master
    ```