Initializing a new github repo
Quick and simple guide to initializing a new github repo.
First you'll need
git installed on your system, this command is for debian:
$ runas apt-get install git
gitis installed, you'll need to create a new repository on the github website, do not initialize this with a README.md file yet: https://github.com/new Next, on the system hosting the files, change to the root directory of the data you'd like to upload:
You may have to tell git who you are for the commit:
$ git init $ git add . $ git commit -m “Your first commit message”
Push it! Just make sure to grab the correct URL from the repository you just created. You can either do this with HTTPS or via SSH depending on your preference. This one is done in SSH.
$ git config --global user.email "firstname.lastname@example.org” $ git config --global user.name “your_name"
And that's it. You should be able to view all the uploaded code on github now, make changes locally and commit as needed for version control.
$ git remote add origin email@example.com:[your_git_username]/[your_new_repo].git $ git push -u origin master