Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
StaSh and Git Cmd problems
-
For anyone reading, I found out git add . (Dot), Does not add everything in the dir, an error is created. from what I read I think it's suppose to. But wildcards work, i.e git add *.py or git add . both work.
git commit . , appears to commit everything in the directory. -
I have this simple alias in
.stashrc
. It adds, commits and pushes all modified files.alias gup='git add `git modified`; git commit; git push'
-
@mikael , not sure why, but your alias did work for me. But fantastic to know about the alias cmd...
I did - alias guppie='clear; git add (star.star) ; git status; git commit . ; git push'
And it works as I expected it to. I could not work out how to escape the asterisk:(The output from when I run up is below. Hmmm, however as I was writing this it dawned on me it's different. You are adding modified, I am adding all were you are adding modified. So if I rung up and there is a modified file it does work. If there is nothing modified only new files, you get the msg below.
But thanks, it's been super helpful[lords_project]$ gup
Adding
stash: <type 'exceptions.IOError'>: [Errno 21] Is a directory: '/private/var/mobile/Containers/Shared/AppGroup/3533032E-E336-4C25-BBC4-112A6BF2AF75/Pythonista3/Documents/MyDeployments/lords_project/'Commit Message:
1a519e20424aedc23e01b46e7014bb7d45785f2a
Attempting to push to: https://github.com/Phuket2/lords_project.git, branch: refs/heads/master
Push to https://Phuket2:*******@github.com/Phuket2/lords_project.git successful.success!
[lords_project]$ -
@mikael , do you know about .jpg files being in a repo. .jpg files seems to screw things up. When I run my guppie cmd with a .jpg in the dir I get the below. I am guessing binary data can not be sent
Adding Created_in_git.py
Adding IMG_1470.PNG
Adding README.md
Adding junk.py
Adding mypyuifile.pyui
Adding program.py
Adding test1.py
Adding test2.py
Adding test3.py
Adding test4.py
STAGED
add['IMG_1470.PNG']
UNSTAGED LOCAL MODS
[]
f9bc619d876e6ab9e206ad3e565e6c2851677a28
Attempting to push to: https://github.com/Phuket2/lords_project.git, branch: refs/heads/master
stash: <class 'urllib2.URLError'>: <urlopen error [Errno 32] Broken pipe>[lords_project]$
-
-
@mikael , thanks. Yeah, I get exactly same as you. Can not recover. I tried git reset --hard etc. nothing seems to work to get it back in shape. Looks like it's still unresolved.
But really, I am very happy with what I have managed to get working so far with your guys help. It's a miracle for me :) black magic. I will just avoid bin files for the moment. If I do need one, I will try to add it another way and pull it down (hopefully)
Thanks again -
@mikael , just to let you know. I uploaded a .jpg file into the repo with Github web client. The pull from StaSh was successful.
-
@Phuket2, yes, that works. However, working from an iPhone, I have yet to find the place where you can rename the uploaded file in the Github web interface.
-
@mikael , on my ipad I could also not see a way to rename it in the. Web interface. I cloned the repo in working copy. I could rename it there.
Then I did a pull in StaSh and ended up with a new image file and the old one was still in my Pythonista dir. Maybe I should have used merge or something, I am not sure -
iirc the stash git tutorial had a review of how to use ssh-keygen, and then how to upload to git. Then you can use
git remote
to add a link to the ssh://git@github.com/tourname/yourrepo.git url, (i usually name it sshorigin) then git push sshorigin should work. I think there is a size limit for the https in dulwich.