omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    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

    Pythonista
    git stash
    3
    15
    9084
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Phuket2
      Phuket2 last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • mikael
        mikael last edited by

        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'
        
        Phuket2 2 Replies Last reply Reply Quote 1
        • Phuket2
          Phuket2 @mikael last edited by

          @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]$

          1 Reply Last reply Reply Quote 0
          • Phuket2
            Phuket2 @mikael last edited by

            @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 1 Reply Last reply Reply Quote 0
            • mikael
              mikael @Phuket2 last edited by

              @Phuket2, see this.

              Phuket2 2 Replies Last reply Reply Quote 1
              • Phuket2
                Phuket2 @mikael last edited by

                @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

                1 Reply Last reply Reply Quote 0
                • Phuket2
                  Phuket2 @mikael last edited by

                  @mikael , just to let you know. I uploaded a .jpg file into the repo with Github web client. The pull from StaSh was successful.

                  mikael 1 Reply Last reply Reply Quote 0
                  • mikael
                    mikael @Phuket2 last edited by

                    @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.

                    Phuket2 1 Reply Last reply Reply Quote 0
                    • Phuket2
                      Phuket2 @mikael last edited by

                      @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

                      1 Reply Last reply Reply Quote 0
                      • JonB
                        JonB last edited by ccc

                        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.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Powered by NodeBB Forums | Contributors