Skip to content

Instantly share code, notes, and snippets.

// https://gist.github.com/davidroth/1106927
// Licence: MIT X11
// Note: This is an Objective-C to C# translation by using code from: http://code.google.com/p/toast-notifications-ios/
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using System.Drawing;
using MonoTouch.ObjCRuntime;
using System;
@danmiser
danmiser / github-clone-into-non-empty.md
Last active November 23, 2020 18:25 — forked from jweston491/github-clone-into-non-empty.md
Git clone into non-empty directory

Thanks to cmcginty from https://stackoverflow.com/questions/2411031/how-do-i-clone-into-a-non-empty-directory

Useful for if you have a local project directory that you want to re-sync with your git repo

git init
git remote add origin PATH/TO/REPO
git fetch
git reset origin/master  # Required when the versioned files existed in path before "git init" of this repo.
# git checkout -t origin/master # Original line, but gave me an error

git branch --set-upstream-to=origin/master