0

I have a gist which is managed by an IDE extension. Now I want to have two different setups, starting with the current setup as base. How do I duplicate my existing gist? There doesn't seem to be any relevant option on GitHub.

loxx
  • 119
  • 4
aksh1618
  • 2,245
  • 18
  • 37

1 Answers1

3

Gists are basically git repositories with all files at root directory. Unfortunately there is no way to easily duplicate a gist through Github UI. We need to go through these steps:

  1. Create the destination gist: Add random stuff as part of it, we just need a gist id.
  2. Clone source gist & force push to destination gist:
    cd /tmp
    git clone git@gist.github.com:<source-gist-id>.git source-gist
    cd source-gist
    git push --force git@gist.github.com:<destination-gist-id>.git
    
aksh1618
  • 2,245
  • 18
  • 37