Create Gist Workflow

It's great to be able to select the files you want and create a gist including these files, but whenever I try to clone the gist I get errors when I try to push to the remote.
I am new to github and find it very confusing so, when I have these problems, I kind of bumble arround until it works.
When I search for information about the errors I see, I find a million different solutions to the problem but, they are all written in git-Klingon which is rediculously complicated and incomprehensible.

What is the recommended workflow for creating a gist in WebStorm and then connecting that remote to a local git repo and then manage the gist by local edits and pushes?

The only way I can make it work first time is to...

  1. create the gist from webstorm by selecting the files to be included then using the Create Gist... option
  2. select to have the gist open in the browser...
  3. then create a fresh folder with nothing in it and git init it
  4. then git clone with the empty folder as the active folder, using the https link from the gist
  5. then git pull to download the files from the gist
  6. then I can manage the gist localy and push updates to the remote

The only problem is, I now have two copies of the files on my disk.

What I have been trying to do is work the other way arround...

  1. create a local gist folder (as a sub-folder in my project) and move create the gist files in it
  2. create the gist from webstorm by using the Create Gist... option (defaulting to all files for example)
  3. select to have the gist open in the browser...
  4. git clone the gist to the local gist folder
  5. make some edits localy and push them to the remote
  6. boing! this is where it always fails, saying the push was rejected due to some Klingon fast-forward thing.

Seriously? Nobody has a clue?


using Webstorm 10


Please sign in to leave a comment.