Skip to content

Instantly share code, notes, and snippets.

@rmueller
rmueller / switch-local-git-repo-to-fork.md
Created December 29, 2017 10:46 — forked from jpierson/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. Below is a set of instructions I've developed for myself on how to deal with this scenario and an explanation of why it matters based on jagregory's gist.

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. My understanding is that the typical setup would have your local repository pointing to your fork as origin and the original forked repository as upstream so that you can use these keywords in other git commands.

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

    git clone git@github...some-repo.git
@rmueller
rmueller / statsd_graphite_ubuntu14.sh
Last active November 2, 2015 20:53 — forked from rposbo/statsd_graphite_ubuntu14.sh
A single script to setup StatsD and Graphite on Ubuntu 15.10 on Azure
#!/bin/bash
# First I usually add a new disk and mount it on /opt, to make sure I dont run out of space on / on azure ubuntu linux
# https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-how-to-attach-disk/
echo "#### Starting"
echo "#### apt-get updating and installing"
sudo apt-get update
sudo apt-get install screen libexpat1-dev libicu-dev git build-essential curl software-properties-common python-software-properties -y