Skip to content

Instantly share code, notes, and snippets.

View skylord-a52's full-sized avatar

skylord-a52

View GitHub Profile
@zenideas
zenideas / existing code to git repo
Created October 1, 2012 09:52
Adding existing source to remote git repo
If you've got local source code you want to add to a new remote new git repository without 'cloning' the remote first, do the following (I often do this - you create your remote empty repository in bitbucket/github, then push up your source)
1. Create the remote repository, and get the URL such as git://github.com/youruser/somename.git
2. If your local GIT repo is already set up, skips steps 2 and 3
3. Locally, at the root directory of your source, git init
4. Locally, add and commit what you want in your initial repo (for everything,
git add .