Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Uploading actual .git to visualize stuff #897

Open
artt opened this issue Nov 10, 2021 · 8 comments
Open

[Feature request] Uploading actual .git to visualize stuff #897

artt opened this issue Nov 10, 2021 · 8 comments

Comments

@artt
Copy link

artt commented Nov 10, 2021

One of the things that I found most useful about this is that I can test what would happen to my git repo if I do this and that. Sandboxing, you know.

For now, I have to work from the basic C0/C1 nodes and make it look more or less like the repo I'm working on. I was thinking it would be nice if the user could upload an actual .git (or whatever files need just to reproduce the graph... I'm a noob) to bypass this step.

To push this even further, I see lots of threads on stack overflow asking about git and people had to describe their setup in words. This project can be made into something similar to jsfiddle or codesandbox, but git sandbox instead. With this, they could link to the "sandbox" in their questions and people can just come and see.

The second point is kinda far off, since you would need a backend to store all this, but just an idea 😁

@artt
Copy link
Author

artt commented Nov 10, 2021

To this end, I think factoring out this very well put together core logic modules into a separate library that people can build their own frontends/use cases (like one for lesson, another for sandboxing) would be really neat :)

@pcottle
Copy link
Owner

pcottle commented Nov 10, 2021

Thanks for the feedback!

To push this even further, I see lots of threads on stack overflow asking about git and people had to describe their setup in words. This project can be made into something similar to jsfiddle or codesandbox, but git sandbox instead. With this, they could link to the "sandbox" in their questions and people can just come and see.

There's actually something similar to this already; you can link into a specific gist id that represents a level or sandbox state:
https://learngitbranching.js.org/?gist_level_id=a84407351f9c9f0cb241

I think the remaining work to match something like jsfiddle would be to drive awareness of the feature, and help folks easily copy the data into a gist and create the permalink.

@artt
Copy link
Author

artt commented Nov 11, 2021

Learning new things every day!

@artt artt closed this as completed Nov 11, 2021
@artt artt reopened this Nov 13, 2021
@artt
Copy link
Author

artt commented Nov 13, 2021

Sorry. Didn't realize that the gist thing doesn't cover the first part.

@kaushalgautam
Copy link

Thanks for the feedback!

To push this even further, I see lots of threads on stack overflow asking about git and people had to describe their setup in words. This project can be made into something similar to jsfiddle or codesandbox, but git sandbox instead. With this, they could link to the "sandbox" in their questions and people can just come and see.

There's actually something similar to this already; you can link into a specific gist id that represents a level or sandbox state: https://learngitbranching.js.org/?gist_level_id=a84407351f9c9f0cb241

I think the remaining work to match something like jsfiddle would be to drive awareness of the feature, and help folks easily copy the data into a gist and create the permalink.

@pcottle - could you please explain the process? I am a little lost here :/

@pcottle
Copy link
Owner

pcottle commented Dec 1, 2021

Yeah sure, its a bit obscure like I mentioned. you can start with the build level instructions here:
https://github.com/pcottle/learnGitBranching#level-builder

once you finish that process, you will get a dialog that shows you a big JSON blob representing your level. copy that into a new github gist like so:
https://gist.github.com/pcottle/36ba1333c6b3639c0babaaffc351e1c9

then if you edit the permalink to point to that gist ID:
https://learngitbranching.js.org/?gist_level_id=36ba1333c6b3639c0babaaffc351e1c9

we will load up the gist and import that level automatically

@kaushalgautam
Copy link

Aaah, I see now. So the step of building the source tree to replicate your repo is still manual, but once replicated, we can share it easily using gist, right?

@pcottle
Copy link
Owner

pcottle commented Dec 1, 2021

Aaah, I see now. So the step of building the source tree to replicate your repo is still manual, but once replicated, we can share it easily using gist, right?

yep! Fwiw this is how I made all the levels myself; I found it far easier to use a GUI editor than typing out all the JSON manually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants