Skip to content

Instantly share code, notes, and snippets.

@whatif-dev
Forked from 0xjac/private_fork.md
Last active July 11, 2024 20:05
Show Gist options
  • Save whatif-dev/9559d429d6b847190b3b8d1013181e82 to your computer and use it in GitHub Desktop.
Save whatif-dev/9559d429d6b847190b3b8d1013181e82 to your computer and use it in GitHub Desktop.

Revisions

  1. whatif-dev revised this gist Jul 11, 2024. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion private_fork.md
    Original file line number Diff line number Diff line change
    @@ -27,7 +27,8 @@
    ```
    > And solve the conflicts if any

    3B. Alternative
    4. Alternative if no conflicts

    ```bash
    # Fetch the upstream changes
    git fetch upstream
  2. whatif-dev revised this gist Jul 11, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion private_fork.md
    Original file line number Diff line number Diff line change
    @@ -27,7 +27,7 @@
    ```
    > And solve the conflicts if any

    3B. Alternative
    ```bash
    # Fetch the upstream changes
    git fetch upstream
  3. whatif-dev revised this gist Jul 11, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion private_fork.md
    Original file line number Diff line number Diff line change
    @@ -25,7 +25,7 @@
    git fetch upstream
    git rebase upstream/master
    ```
    And solve the conflicts if any
    > And solve the conflicts if any


    ```bash
  4. whatif-dev revised this gist Jul 11, 2024. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions private_fork.md
    Original file line number Diff line number Diff line change
    @@ -27,6 +27,7 @@
    ```
    And solve the conflicts if any


    ```bash
    # Fetch the upstream changes
    git fetch upstream
  5. whatif-dev revised this gist Jul 11, 2024. 1 changed file with 14 additions and 0 deletions.
    14 changes: 14 additions & 0 deletions private_fork.md
    Original file line number Diff line number Diff line change
    @@ -26,6 +26,20 @@
    git rebase upstream/master
    ```
    And solve the conflicts if any

    ```bash
    # Fetch the upstream changes
    git fetch upstream
    # Switch to your main branch
    git checkout main
    # Merge the upstream changes into your local main branch
    git merge upstream/main
    # Push the merged changes to your origin repository
    git push origin main
    ```

    # OLD WAY

  6. whatif-dev revised this gist Jul 11, 2024. 1 changed file with 29 additions and 8 deletions.
    37 changes: 29 additions & 8 deletions private_fork.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,32 @@

    # NEW WAY

    1. Go to this [link](https://github.com/new/import).

    2. Insert the repo link to fork

    3. If you want, add the original repo as remote to fetch (potential) future changes.
    Make sure you also disable push on the remote (as you are not allowed to push to it anyway).
    ```bash
    git remote add upstream [email protected]:usi-systems/easytrace.git
    git remote set-url --push upstream DISABLE
    ```
    You can list all your remotes with `git remote -v`. You should see:
    ```
    origin [email protected]:<your_username>/easytrace.git (fetch)
    origin [email protected]:<your_username>/easytrace.git (push)
    upstream [email protected]:usi-systems/easytrace.git (fetch)
    upstream DISABLE (push)
    ```
    > When you push, do so on `origin` with `git push origin`.

    > When you want to pull changes from `upstream` you can just fetch the remote and rebase on top of your work.
    ```bash
    git fetch upstream
    git rebase upstream/master
    ```
    And solve the conflicts if any

    # OLD WAY

    The [repository](https://github.com/usi-systems/easytrace) for the assignment is public and Github does not allow the creation of private forks for public repositories.
    @@ -71,11 +100,3 @@ For this assignment the commands are:
    ```

    9. The `easytrace` repo is available at `/easytrace` once you ssh into the machine.

    # NEW WAY

    1 - Go to this [link](https://github.com/new/import).

    2 - Insert the repo link to fork

    3 -
  7. whatif-dev revised this gist Jul 11, 2024. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion private_fork.md
    Original file line number Diff line number Diff line change
    @@ -72,4 +72,10 @@ For this assignment the commands are:

    9. The `easytrace` repo is available at `/easytrace` once you ssh into the machine.

    # NEW WAY
    # NEW WAY

    1 - Go to this [link](https://github.com/new/import).

    2 - Insert the repo link to fork

    3 -
  8. whatif-dev revised this gist Jul 11, 2024. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion private_fork.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    # OLD WAY

    The [repository](https://github.com/usi-systems/easytrace) for the assignment is public and Github does not allow the creation of private forks for public repositories.

    The correct way of creating a private frok by duplicating the repo is documented [here](https://help.github.com/articles/duplicating-a-repository/).
    @@ -68,4 +70,6 @@ For this assignment the commands are:
    vagrant reload
    ```

    9. The `easytrace` repo is available at `/easytrace` once you ssh into the machine.
    9. The `easytrace` repo is available at `/easytrace` once you ssh into the machine.

    # NEW WAY
  9. @0xjac 0xjac revised this gist Dec 7, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion private_fork.md
    Original file line number Diff line number Diff line change
    @@ -56,7 +56,7 @@ For this assignment the commands are:
    ```
    And solve the conflicts if any

    7. Make your `easytrace` repo available in your Vagrant VM by adding the following to your Vagrantfile
    7. Make your `easytrace` repo available in your Vagrant VM by adding the following to your Vagrantfile
    > Replace `"~/code/easytrace"` with your local path to the `easytrace` repo.

    ```
  10. @0xjac 0xjac revised this gist Dec 7, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion private_fork.md
    Original file line number Diff line number Diff line change
    @@ -49,7 +49,7 @@ For this assignment the commands are:
    ```
    > When you push, do so on `origin` with `git push origin`.

    When you want to pull changes from `upstream` you can just fetch the remote and rebase on top of your work.
    > When you want to pull changes from `upstream` you can just fetch the remote and rebase on top of your work.
    ```bash
    git fetch upstream
    git rebase upstream/master
  11. @0xjac 0xjac revised this gist Dec 7, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions private_fork.md
    Original file line number Diff line number Diff line change
    @@ -48,6 +48,7 @@ For this assignment the commands are:
    upstream DISABLE (push)
    ```
    > When you push, do so on `origin` with `git push origin`.

    When you want to pull changes from `upstream` you can just fetch the remote and rebase on top of your work.
    ```bash
    git fetch upstream
  12. @0xjac 0xjac revised this gist Dec 7, 2016. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions private_fork.md
    Original file line number Diff line number Diff line change
    @@ -48,9 +48,8 @@ For this assignment the commands are:
    upstream DISABLE (push)
    ```
    > When you push, do so on `origin` with `git push origin`.
    >
    > To pull changes from `upstream`:
    > ```bash
    When you want to pull changes from `upstream` you can just fetch the remote and rebase on top of your work.
    ```bash
    git fetch upstream
    git rebase upstream/master
    ```
  13. @0xjac 0xjac revised this gist Dec 7, 2016. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion private_fork.md
    Original file line number Diff line number Diff line change
    @@ -55,7 +55,8 @@ For this assignment the commands are:
    git rebase upstream/master
    ```
    And solve the conflicts if any
    7. Make your `easytrace` repo available in your Vagrant VM by adding the following to your Vagrantfile

    7. Make your `easytrace` repo available in your Vagrant VM by adding the following to your Vagrantfile
    > Replace `"~/code/easytrace"` with your local path to the `easytrace` repo.

    ```
  14. @0xjac 0xjac revised this gist Dec 7, 2016. 1 changed file with 1 addition and 6 deletions.
    7 changes: 1 addition & 6 deletions private_fork.md
    Original file line number Diff line number Diff line change
    @@ -40,15 +40,13 @@ For this assignment the commands are:
    git remote add upstream [email protected]:usi-systems/easytrace.git
    git remote set-url --push upstream DISABLE
    ```

    You can list all your remotes with `git remote -v`. You should see:
    ```
    origin [email protected]:<your_username>/easytrace.git (fetch)
    origin [email protected]:<your_username>/easytrace.git (push)
    upstream [email protected]:usi-systems/easytrace.git (fetch)
    upstream DISABLE (push)
    ```

    > When you push, do so on `origin` with `git push origin`.
    >
    > To pull changes from `upstream`:
    @@ -57,9 +55,6 @@ For this assignment the commands are:
    git rebase upstream/master
    ```
    And solve the conflicts if any



    7. Make your `easytrace` repo available in your Vagrant VM by adding the following to your Vagrantfile
    > Replace `"~/code/easytrace"` with your local path to the `easytrace` repo.

    @@ -72,4 +67,4 @@ For this assignment the commands are:
    vagrant reload
    ```

    9. The `easytrace` repo is available at `/easytrace` once you ssh into the machine.
    9. The `easytrace` repo is available at `/easytrace` once you ssh into the machine.
  15. @0xjac 0xjac revised this gist Dec 7, 2016. 1 changed file with 55 additions and 55 deletions.
    110 changes: 55 additions & 55 deletions private_fork.md
    Original file line number Diff line number Diff line change
    @@ -5,71 +5,71 @@ The correct way of creating a private frok by duplicating the repo is documented
    For this assignment the commands are:

    1. Create a bare clone of the repository.
    (This is temporary and will be removed so just do it wherever.)
    ```bash
    git clone --bare [email protected]:usi-systems/easytrace.git
    ```
    (This is temporary and will be removed so just do it wherever.)
    ```bash
    git clone --bare [email protected]:usi-systems/easytrace.git
    ```

    2. [Create a new private repository on Github](https://help.github.com/articles/creating-a-new-repository/) and name it `easytrace`.
    > If you are unable to create a private repo, you can request unlimited private repos as a studant by getting
    > the [student pack](https://education.github.com/pack) from Github.
    > If you are unable to create a private repo, you can request unlimited private repos as a studant by getting
    > the [student pack](https://education.github.com/pack) from Github.

    3. Mirror-push your bare clone to your new `easytrace` repository.
    > Replace `<your_username>` with your actual Github username in the url below.
    ```bash
    cd easytrace.git
    git push --mirror [email protected]:<your_username>/easytrace.git
    ```
    > Replace `<your_username>` with your actual Github username in the url below.
    ```bash
    cd easytrace.git
    git push --mirror [email protected]:<your_username>/easytrace.git
    ```

    4. Remove the temporary local repository you created in step 1.
    ```bash
    cd ..
    rm -rf easytrace.git
    ```

    ```bash
    cd ..
    rm -rf easytrace.git
    ```
    5. You can now clone your `easytrace` repository on your machine (in my case in the `code` folder).
    ```bash
    cd ~/code
    git clone [email protected]:<your_username>/easytrace.git
    ```
    ```bash
    cd ~/code
    git clone [email protected]:<your_username>/easytrace.git
    ```

    6. If you want, add the original repo as remote to fetch (potential) future changes.
    Make sure you also disable push on the remote (as you are not allowed to push to it anyway).
    ```bash
    git remote add upstream [email protected]:usi-systems/easytrace.git
    git remote set-url --push upstream DISABLE
    ```

    You can list all your remotes with `git remote -v`. You should see:
    ```
    origin [email protected]:<your_username>/easytrace.git (fetch)
    origin [email protected]:<your_username>/easytrace.git (push)
    upstream [email protected]:usi-systems/easytrace.git (fetch)
    upstream DISABLE (push)
    ```

    > When you push, do so on `origin` with `git push origin`.
    >
    > To pull changes from `upstream`:
    > ```bash
    git fetch upstream
    git rebase upstream/master
    ```
    And solve the conflicts if any
    Make sure you also disable push on the remote (as you are not allowed to push to it anyway).
    ```bash
    git remote add upstream [email protected]:usi-systems/easytrace.git
    git remote set-url --push upstream DISABLE
    ```

    You can list all your remotes with `git remote -v`. You should see:
    ```
    origin [email protected]:<your_username>/easytrace.git (fetch)
    origin [email protected]:<your_username>/easytrace.git (push)
    upstream [email protected]:usi-systems/easytrace.git (fetch)
    upstream DISABLE (push)
    ```

    > When you push, do so on `origin` with `git push origin`.
    >
    > To pull changes from `upstream`:
    > ```bash
    git fetch upstream
    git rebase upstream/master
    ```
    And solve the conflicts if any



    7. Make your `easytrace` repo available in your Vagrant VM by adding the following to your Vagrantfile
    > Replace `"~/code/easytrace"` with your local path to the `easytrace` repo.
    ```
    config.vm.synced_folder "~/code/easytrace", "/easytrace"
    ```
    > Replace `"~/code/easytrace"` with your local path to the `easytrace` repo.
    ```
    config.vm.synced_folder "~/code/easytrace", "/easytrace"
    ```
    8. Reload your VM to enable the synced folder (in the folder containing your Vagrant file).
    ```bash
    vagrant reload
    ```
    ```bash
    vagrant reload
    ```
    9. The `easytrace` repo is available at `/easytrace` once you ssh into the machine.
  16. @0xjac 0xjac revised this gist Dec 7, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions private_fork.md
    Original file line number Diff line number Diff line change
    @@ -59,6 +59,7 @@ For this assignment the commands are:
    And solve the conflicts if any
    7. Make your `easytrace` repo available in your Vagrant VM by adding the following to your Vagrantfile
    > Replace `"~/code/easytrace"` with your local path to the `easytrace` repo.
  17. @0xjac 0xjac revised this gist Dec 7, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions private_fork.md
    Original file line number Diff line number Diff line change
    @@ -58,6 +58,7 @@ For this assignment the commands are:
    ```
    And solve the conflicts if any
    7. Make your `easytrace` repo available in your Vagrant VM by adding the following to your Vagrantfile
    > Replace `"~/code/easytrace"` with your local path to the `easytrace` repo.
  18. @0xjac 0xjac revised this gist Dec 7, 2016. 1 changed file with 10 additions and 10 deletions.
    20 changes: 10 additions & 10 deletions private_fork.md
    Original file line number Diff line number Diff line change
    @@ -4,37 +4,37 @@ The correct way of creating a private frok by duplicating the repo is documented

    For this assignment the commands are:

    1. Create a bare clone of the repository.
    1. Create a bare clone of the repository.
    (This is temporary and will be removed so just do it wherever.)
    ```bash
    git clone --bare [email protected]:usi-systems/easytrace.git
    ```

    2. [Create a new private repository on Github](https://help.github.com/articles/creating-a-new-repository/) and name it `easytrace`.
    2. [Create a new private repository on Github](https://help.github.com/articles/creating-a-new-repository/) and name it `easytrace`.
    > If you are unable to create a private repo, you can request unlimited private repos as a studant by getting
    > the [student pack](https://education.github.com/pack) from Github.
    3. Mirror-push your bare clone to your new `easytrace` repository.
    3. Mirror-push your bare clone to your new `easytrace` repository.
    > Replace `<your_username>` with your actual Github username in the url below.
    ```bash
    cd easytrace.git
    git push --mirror [email protected]:<your_username>/easytrace.git
    ```

    4. Remove the temporary local repository you created in step 1.
    4. Remove the temporary local repository you created in step 1.
    ```bash
    cd ..
    rm -rf easytrace.git
    ```

    5. You can now clone your `easytrace` repository on your machine (in my case in the `code` folder).
    5. You can now clone your `easytrace` repository on your machine (in my case in the `code` folder).
    ```bash
    cd ~/code
    git clone [email protected]:<your_username>/easytrace.git
    ```

    6. If you want, add the original repo as remote to fetch (potential) future changes.
    6. If you want, add the original repo as remote to fetch (potential) future changes.
    Make sure you also disable push on the remote (as you are not allowed to push to it anyway).
    ```bash
    git remote add upstream [email protected]:usi-systems/easytrace.git
    @@ -43,8 +43,8 @@ For this assignment the commands are:

    You can list all your remotes with `git remote -v`. You should see:
    ```
    origin [email protected]:jacquesd/easytrace.git (fetch)
    origin [email protected]:jacquesd/easytrace.git (push)
    origin [email protected]:<your_username>/easytrace.git (fetch)
    origin [email protected]:<your_username>/easytrace.git (push)
    upstream [email protected]:usi-systems/easytrace.git (fetch)
    upstream DISABLE (push)
    ```
    @@ -58,14 +58,14 @@ For this assignment the commands are:
    ```
    And solve the conflicts if any
    7. Make your `easytrace` repo available in your Vagrant VM by adding the following to your Vagrantfile
    7. Make your `easytrace` repo available in your Vagrant VM by adding the following to your Vagrantfile
    > Replace `"~/code/easytrace"` with your local path to the `easytrace` repo.
    ```
    config.vm.synced_folder "~/code/easytrace", "/easytrace"
    ```
    8. Reload your VM to enable the synced folder (in the folder containing your Vagrant file).
    8. Reload your VM to enable the synced folder (in the folder containing your Vagrant file).
    ```bash
    vagrant reload
    ```
  19. @0xjac 0xjac revised this gist Dec 7, 2016. 1 changed file with 10 additions and 11 deletions.
    21 changes: 10 additions & 11 deletions private_fork.md
    Original file line number Diff line number Diff line change
    @@ -4,42 +4,43 @@ The correct way of creating a private frok by duplicating the repo is documented

    For this assignment the commands are:

    #. Create a bare clone of the repository.
    1. Create a bare clone of the repository.
    (This is temporary and will be removed so just do it wherever.)
    ```bash
    git clone --bare [email protected]:usi-systems/easytrace.git
    ```

    #. [Create a new private repository on Github](https://help.github.com/articles/creating-a-new-repository/) and name it `easytrace`.
    2. [Create a new private repository on Github](https://help.github.com/articles/creating-a-new-repository/) and name it `easytrace`.
    > If you are unable to create a private repo, you can request unlimited private repos as a studant by getting
    > the [student pack](https://education.github.com/pack) from Github.
    #. Mirror-push your bare clone to your new `easytrace` repository.
    3. Mirror-push your bare clone to your new `easytrace` repository.
    > Replace `<your_username>` with your actual Github username in the url below.
    ```bash
    cd easytrace.git
    git push --mirror [email protected]:<your_username>/easytrace.git
    ```

    #. Remove the temporary local repository you created in step 1.
    4. Remove the temporary local repository you created in step 1.
    ```bash
    cd ..
    rm -rf easytrace.git
    ```

    #. You can now clone your `easytrace` repository on your machine (in my case in the `code` folder).
    5. You can now clone your `easytrace` repository on your machine (in my case in the `code` folder).
    ```bash
    cd ~/code
    git clone [email protected]:<your_username>/easytrace.git
    ```

    #. If you want, add the original repo as remote to fetch (potential) future changes.
    6. If you want, add the original repo as remote to fetch (potential) future changes.
    Make sure you also disable push on the remote (as you are not allowed to push to it anyway).
    ```bash
    git remote add upstream [email protected]:usi-systems/easytrace.git
    git remote set-url --push upstream DISABLE
    ```

    You can list all your remotes with `git remote -v`. You should see:
    ```
    origin [email protected]:jacquesd/easytrace.git (fetch)
    @@ -57,18 +58,16 @@ For this assignment the commands are:
    ```
    And solve the conflicts if any
    #. Make your `easytrace` repo available in your Vagrant VM by adding the following to your Vagrantfile
    7. Make your `easytrace` repo available in your Vagrant VM by adding the following to your Vagrantfile
    > Replace `"~/code/easytrace"` with your local path to the `easytrace` repo.
    ```
    config.vm.synced_folder "~/code/easytrace", "/easytrace"
    ```
    #. Reload your VM to enable the synced folder (in the folder containing your Vagrant file).
    8. Reload your VM to enable the synced folder (in the folder containing your Vagrant file).
    ```bash
    vagrant reload
    ```
    #. The `easytrace` repo is available at `/easytrace` once you ssh into the machine.
    9. The `easytrace` repo is available at `/easytrace` once you ssh into the machine.
  20. @0xjac 0xjac revised this gist Dec 7, 2016. 1 changed file with 9 additions and 9 deletions.
    18 changes: 9 additions & 9 deletions private_fork.md
    Original file line number Diff line number Diff line change
    @@ -4,37 +4,37 @@ The correct way of creating a private frok by duplicating the repo is documented

    For this assignment the commands are:

    1. Create a bare clone of the repository.
    #. Create a bare clone of the repository.
    (This is temporary and will be removed so just do it wherever.)
    ```bash
    git clone --bare [email protected]:usi-systems/easytrace.git
    ```

    2. [Create a new private repository on Github](https://help.github.com/articles/creating-a-new-repository/) and name it `easytrace`.
    #. [Create a new private repository on Github](https://help.github.com/articles/creating-a-new-repository/) and name it `easytrace`.
    > If you are unable to create a private repo, you can request unlimited private repos as a studant by getting
    > the [student pack](https://education.github.com/pack) from Github.
    3. Mirror-push your bare clone to your new `easytrace` repository.
    #. Mirror-push your bare clone to your new `easytrace` repository.
    > Replace `<your_username>` with your actual Github username in the url below.
    ```bash
    cd easytrace.git
    git push --mirror [email protected]:<your_username>/easytrace.git
    ```

    4. Remove the temporary local repository you created in step 1.
    #. Remove the temporary local repository you created in step 1.
    ```bash
    cd ..
    rm -rf easytrace.git
    ```

    5. You can now clone your `easytrace` repository on your machine (in my case in the `code` folder).
    #. You can now clone your `easytrace` repository on your machine (in my case in the `code` folder).
    ```bash
    cd ~/code
    git clone [email protected]:<your_username>/easytrace.git
    ```

    6. If you want, add the original repo as remote to fetch (potential) future changes.
    #. If you want, add the original repo as remote to fetch (potential) future changes.
    Make sure you also disable push on the remote (as you are not allowed to push to it anyway).
    ```bash
    git remote add upstream [email protected]:usi-systems/easytrace.git
    @@ -57,18 +57,18 @@ For this assignment the commands are:
    ```
    And solve the conflicts if any
    7. Make your `easytrace` repo available in your Vagrant VM by adding the following to your Vagrantfile
    #. Make your `easytrace` repo available in your Vagrant VM by adding the following to your Vagrantfile
    > Replace `"~/code/easytrace"` with your local path to the `easytrace` repo.
    ```
    config.vm.synced_folder "~/code/easytrace", "/easytrace"
    ```
    8. Reload your VM to enable the synced folder (in the folder containing your Vagrant file).
    #. Reload your VM to enable the synced folder (in the folder containing your Vagrant file).
    ```bash
    vagrant reload
    ```
    9. The `easytrace` repo is available at `/easytrace` once you ssh into the machine.
    #. The `easytrace` repo is available at `/easytrace` once you ssh into the machine.
  21. @0xjac 0xjac revised this gist Dec 7, 2016. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion private_fork.md
    Original file line number Diff line number Diff line change
    @@ -47,14 +47,15 @@ For this assignment the commands are:
    upstream [email protected]:usi-systems/easytrace.git (fetch)
    upstream DISABLE (push)
    ```

    > When you push, do so on `origin` with `git push origin`.
    >
    > To pull changes from `upstream`:
    > ```bash
    git fetch upstream
    git rebase upstream/master
    ```
    > And solve the conflicts if any
    And solve the conflicts if any
    7. Make your `easytrace` repo available in your Vagrant VM by adding the following to your Vagrantfile
    > Replace `"~/code/easytrace"` with your local path to the `easytrace` repo.
  22. @0xjac 0xjac revised this gist Dec 7, 2016. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion private_fork.md
    Original file line number Diff line number Diff line change
    @@ -56,7 +56,6 @@ For this assignment the commands are:
    ```
    > And solve the conflicts if any
    7. Make your `easytrace` repo available in your Vagrant VM by adding the following to your Vagrantfile
    > Replace `"~/code/easytrace"` with your local path to the `easytrace` repo.
  23. @0xjac 0xjac revised this gist Dec 7, 2016. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions private_fork.md
    Original file line number Diff line number Diff line change
    @@ -57,18 +57,18 @@ For this assignment the commands are:
    > And solve the conflicts if any
    6. Make your `easytrace` repo available in your Vagrant VM by adding the following to your Vagrantfile
    7. Make your `easytrace` repo available in your Vagrant VM by adding the following to your Vagrantfile
    > Replace `"~/code/easytrace"` with your local path to the `easytrace` repo.
    ```
    config.vm.synced_folder "~/code/easytrace", "/easytrace"
    ```
    7. Reload your VM to enable the synced folder (in the folder containing your Vagrant file).
    8. Reload your VM to enable the synced folder (in the folder containing your Vagrant file).
    ```bash
    vagrant reload
    ```
    8. The `easytrace` repo is available at `/easytrace` once you ssh into the machine.
    9. The `easytrace` repo is available at `/easytrace` once you ssh into the machine.
  24. @0xjac 0xjac revised this gist Dec 7, 2016. 1 changed file with 23 additions and 0 deletions.
    23 changes: 23 additions & 0 deletions private_fork.md
    Original file line number Diff line number Diff line change
    @@ -34,6 +34,29 @@ For this assignment the commands are:
    git clone [email protected]:<your_username>/easytrace.git
    ```

    6. If you want, add the original repo as remote to fetch (potential) future changes.
    Make sure you also disable push on the remote (as you are not allowed to push to it anyway).
    ```bash
    git remote add upstream [email protected]:usi-systems/easytrace.git
    git remote set-url --push upstream DISABLE
    ```
    You can list all your remotes with `git remote -v`. You should see:
    ```
    origin [email protected]:jacquesd/easytrace.git (fetch)
    origin [email protected]:jacquesd/easytrace.git (push)
    upstream [email protected]:usi-systems/easytrace.git (fetch)
    upstream DISABLE (push)
    ```
    > When you push, do so on `origin` with `git push origin`.
    >
    > To pull changes from `upstream`:
    > ```bash
    git fetch upstream
    git rebase upstream/master
    ```
    > And solve the conflicts if any
    6. Make your `easytrace` repo available in your Vagrant VM by adding the following to your Vagrantfile
    > Replace `"~/code/easytrace"` with your local path to the `easytrace` repo.
  25. @0xjac 0xjac revised this gist Dec 7, 2016. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion private_fork.md
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,9 @@ For this assignment the commands are:
    git clone --bare [email protected]:usi-systems/easytrace.git
    ```

    2. Create a new repository on Github and name it `easytrace`.
    2. [Create a new private repository on Github](https://help.github.com/articles/creating-a-new-repository/) and name it `easytrace`.
    > If you are unable to create a private repo, you can request unlimited private repos as a studant by getting
    > the [student pack](https://education.github.com/pack) from Github.
    3. Mirror-push your bare clone to your new `easytrace` repository.
    > Replace `<your_username>` with your actual Github username in the url below.
  26. @0xjac 0xjac revised this gist Dec 7, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions private_fork.md
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,11 @@
    The [repository](https://github.com/usi-systems/easytrace) for the assignment is public and Github does not allow the creation of private forks for public repositories.

    The correct way of creating a private frok by duplicating the repo is documented [here](https://help.github.com/articles/duplicating-a-repository/)
    The correct way of creating a private frok by duplicating the repo is documented [here](https://help.github.com/articles/duplicating-a-repository/).

    For this assignment the commands are:

    1. Create a bare clone of the repository.
    (This is temporary and will be removed so just do it wherever)
    (This is temporary and will be removed so just do it wherever.)
    ```bash
    git clone --bare [email protected]:usi-systems/easytrace.git
    ```
  27. @0xjac 0xjac revised this gist Dec 7, 2016. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions private_fork.md
    Original file line number Diff line number Diff line change
    @@ -38,10 +38,12 @@ For this assignment the commands are:
    ```
    config.vm.synced_folder "~/code/easytrace", "/easytrace"
    ```

    7. Reload your VM to enable the synced folder (in the folder containing your Vagrant file).
    ```bash
    vagrant reload
    ```

    8. The `easytrace` repo is available at `/easytrace` once you ssh into the machine.


  28. @0xjac 0xjac revised this gist Dec 7, 2016. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions private_fork.md
    Original file line number Diff line number Diff line change
    @@ -25,11 +25,13 @@ For this assignment the commands are:
    cd ..
    rm -rf easytrace.git
    ```

    5. You can now clone your `easytrace` repository on your machine (in my case in the `code` folder).
    ```bash
    cd ~/code
    git clone [email protected]:<your_username>/easytrace.git
    ```

    6. Make your `easytrace` repo available in your Vagrant VM by adding the following to your Vagrantfile
    > Replace `"~/code/easytrace"` with your local path to the `easytrace` repo.
  29. @0xjac 0xjac revised this gist Dec 7, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion private_fork.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    The [repository]() for the assignment is public and Github does not allow the creation of private forks for public repositories.
    The [repository](https://github.com/usi-systems/easytrace) for the assignment is public and Github does not allow the creation of private forks for public repositories.

    The correct way of creating a private frok by duplicating the repo is documented [here](https://help.github.com/articles/duplicating-a-repository/)

  30. @0xjac 0xjac revised this gist Dec 7, 2016. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions private_fork.md
    Original file line number Diff line number Diff line change
    @@ -14,6 +14,7 @@ For this assignment the commands are:

    3. Mirror-push your bare clone to your new `easytrace` repository.
    > Replace `<your_username>` with your actual Github username in the url below.
    ```bash
    cd easytrace.git
    git push --mirror [email protected]:<your_username>/easytrace.git
    @@ -31,6 +32,7 @@ For this assignment the commands are:
    ```
    6. Make your `easytrace` repo available in your Vagrant VM by adding the following to your Vagrantfile
    > Replace `"~/code/easytrace"` with your local path to the `easytrace` repo.
    ```
    config.vm.synced_folder "~/code/easytrace", "/easytrace"
    ```