Ask coding questions

← Back to all posts
[SOLVED] Is it possible to use git?
12944qwerty (4)

I uploaded my code from github, but I would like to push it again from repl. How would I do this?

Answered by a5rocks (814) [earned 5 cycles]
View Answer
a5rocks (814)

You can run commands on repl. For example, in python, one way is:

import os
os.system('command here')

As far as I know (haven't checked), you can access github from there. So that's one way (i think). Secondly, it shouldn't be too hard to make a repl2git extension, but that's beyond the point.

So three solutions:

  • make an extension (uses the next way)
  • os.system / call commands
  • download your repl and then push that.
12944qwerty (4)

@a5rocks Hi, so would I use os.system('git push')?

a5rocks (814)

@12944qwerty well first, you would need to git init, git add ., and git commit -m "commit message". but yeah, that should work

12944qwerty (4)

@a5rocks Thx! How would I accept your answer?

a5rocks (814)

@12944qwerty You can't, but you can change your title to [SOLVED] blah blah blah so other people know that you don't need help anymore.

amasad (3277)

@a5rocks Just added this feature. I went ahead and accepted it for you.

TheDrone7 (1653)

@amasad next, you might wanna add the feature that this post was about, after your current goal of persistent multiplayer that is.

a5rocks (814)

@TheDrone7 That, or the community can just make a extension. xD

12944qwerty (4)

@amasad I agree with @TheDrone7 . We may want to add a simpler way of using git.

amasad (3277)

@TheDrone7 @12944qwerty yes that's exactly right after multiplayer v2