Skip to content

Instantly share code, notes, and snippets.

View leonsn's full-sized avatar

Leon Schwenk-Nebbe leonsn

  • Denmark
View GitHub Profile
@leonsn
leonsn / switch-local-git-repo-to-fork.md
Last active September 24, 2020 13:40 — forked from ElectricRCAircraftGuy/switch-local-git-repo-to-fork.md
How to move to a fork after cloning

If you are like me you find yourself cloning a repo, making some proposed changes and then deciding to later contributing back using the GitHub Flow convention.

To follow GitHub flow you should really have created a fork initially as a public representation of the forked repository and the clone that instead. The typical setup would have your local repository pointing to your fork as origin and the original forked repository as upstream.

  1. Clone some repo (you've probably already done this step).

@leonsn
leonsn / jupyter_kernels.md
Created September 14, 2020 12:33 — forked from josemarcosrf/jupyter_kernels.md
Jupyter Kernel with virtual env or conda envs

For jupyter notebooks to identify your virtual env kernels:

  1. Activate your env and install ipykernel:
pip install --user ipykernel
  1. Add your virtual environment to Jupyter:
python -m ipykernel install --user --name=myenv
@leonsn
leonsn / private_fork.md
Last active December 16, 2020 10:49 — forked from josemarcosrf/private_fork.md
Create a private fork of a public repository

The official way of creating a private fork by duplicating the repo is documented here: help.github.com/articles/duplicating-a-repository/. It also includes a description of what to do if the repository contains Git Large File Storage objects.

We assume the following:

For this, the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)