Pulling from github with pythonista
Hey, I'm trying to get scripts from my github repository into pythonista to run them from my iOS. I've installed the CodeHub and Pythonista on my iPhone, but still struggling to find how it should work. I know it must be a really trivial thing, but I'm very new to this topic and can't figure that out. Any suggestions?
Thanks @all for your great hints, seems that I can progress now from this point.
Copy the link to the repot and run the script above. It can download entire repos.
@dgelessus, regarding those subtle differences and how to commit new repo and changes to the repo, I have been struggling to find a how to for doing this in StaSH. Any pointers would be highly appreciated.
@mikael The most important things I can think of right now:
- Cloning a repo (
git clone https://github.com/dgelessus/myrepo.git) with Stash
gitputs the repo into the current directory. Real
gitcreates a new subdirectory (in this case
myrepo) and clones the repo in there.
- If you use certain commands in a freshly
git inited repo with no commits, you'll get an obscure error message that the
HEADis missing. To fix this, you just need to commit some files.
- If you get "Broken pipe" errors when pushing, that means your local copy of the repo is outdated and you need to
git pullfirst (I think).
- Before checking out a different branch in Stash
git, make sure that you have committed (or otherwise manually backed up) all your changes, i. e. you should have no unstaged or staged changes. Stash's
git checkoutdoesn't always check if there are uncommitted changes, and simply overwrites/discards them.
There are also some minor syntax differences for a few commands. When in doubt, run
git something --help. Though I think for some commands that don't expect any arguments (like
git init) that just runs the command instead of printing a help message.
Also please note that some of these issues might be fixed in newer Stash versions.
- Cloning a repo (
There is also this, which attempted to go through the basics...
@JonB, looks just the ticket, thanks. Inconvenient how Google did not turn this up earlier, even with all the magic keywords.
@JonB, I was successful with the cheatsheet, but completely failed with your tutorial, with some KeyError. I think the missing bit is the intro on how to do the authentication.
Oh right, in my tutorial it is assumed you have previously pushed to a github repo using stash git, since that saves your login info. I will update the gh command to do that prompt for user info