Rod McLaughlin


Difficulties with Github (10 oct 12)

It turns out my initial commit of my 'routesfordummies' gem commited just one file, README.md, which was empty.

I guess I didn't read the instructions correctly.

But when you google the instructions, you inevitably get a morass of contradictory information.

At one point, I was reduced to downloading the Github application, which, naturally, made things much more difficult. When I tried to upload code, it came up with a message box saying it was unable to delete a repository.

 

Here's what I ended up doing:

$ mkdir gitcheckout
$ cd gitcheckout
$ git clone https://github.com/pdxrod/routesfordummies
$ cp -Rf ../../routesfordummies/* . # copy all the files from routesfordummies to the new folder
$ cp ../../routesfordummies/.gitignore .
$ git remote rm origin
$ git remote add origin git://github.com/pdxrod/routesfordummies
$ git add *
$ git commit -a
$ git push origin master
   fatal: remote error:
   You can't push to git://github.com/pdxrod/routesfordummies.git
   Use git@github.com:pdxrod/routesfordummies.git
$ git remote rm origin
$ git remote add origin git@github.com:pdxrod/routesfordummies
$ git push origin master
   Counting objects: 150, done.
   Delta compression using up to 4 threads.
   Compressing objects: 100% (121/121), done.
   Writing objects: 100% (148/148), 132.43 KiB, done.

Now, if you add this line

  gem 'routesfordummies', github: 'pdxrod/routesfordummies'

to a Gemfile in a Rails 3 or 4 app, and enter

  $ bundle install

you can use 'routesfordummies'.

 



Back
Portland London