Coder Social home page Coder Social logo

[Request] Update gist (files) about gist HOT 3 CLOSED

jdowner avatar jdowner commented on May 26, 2024
[Request] Update gist (files)

from gist.

Comments (3)

jdowner avatar jdowner commented on May 26, 2024

Hi Palatosino,

Thanks for taking the time to create this issue. It seems that there are two issues here. The first is that the "edit" command is not working as you expected. I would really like to fix that. Can you provide some reproduction steps? Does it happen all the time?

The second issue is adding an "update" command. To be honest, I am a little hesitant to add "update" to gist. The "edit" command works the way it does to avoid issues of stale repositories; That is why it temporarily clones the repository (to get an up-to-date version), modifies it, and then pushes it back. This does not guarantee that a merge conflict cannot occur, but it helps.

An "update" to me introduces several ambiguities. For example, it is unclear which direction the update should proceed: does it mean that the local repo is going to be updated or the remote? What happens if the GISTID does not exist? Do all of the filenames have to specified or only the ones that have changed? What happens if an unrecognised filename is specified? All of these problems can be solved, but git already has those solutions and I am not sure there is much benefit in replicating that functionality in gist.

Perhaps one benefit that I can see to your proposed "update" is that you could add/patch files with a local repository. However, gist is still going to have to clone the repository, apply the patch, you will need to create a commit, resolve any conflicts, and then push to the remote.

At the moment, I don't think this is a feature that I want to add but I could be persuaded if you can provide a compelling use case.

from gist.

 avatar commented on May 26, 2024

I reproduced steps and think abaout the error. It is because i don't have SSH key (and autorized it in github). In the readme it say nothing about the ssh-key authorization.

Years ago this step is needed in github, but not now (where you can user username/password without ssh keys).

I created one and autorhized it and i can use clone and edit.

I didn't know that Gist is a git repository, so I will use that to update my gist. Don't worry with the update feature.

Think to add info about ssh-keys in the readme, so other people don't have this problem!

from gist.

jdowner avatar jdowner commented on May 26, 2024

Thanks for figuring that out. I have always used ssh keys so I can easily believe that it is something that I have completely missed in the past.

from gist.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.