How to change website from a git

I’m wondering how to update my website from a git. I’m experimenting with a code editor for my iPad and I cloned my git repo and works perfectly… up until I try to commit my changes. It says “upload failed”. I have a feeling this has to do with glitch itself but not the code editor. Please help!

1 Like

committing should work, but pushing might not work in the default settings. see about receive.denyCurrentBranch here

1 Like

I tried that and then this came up

1 Like

you couldn’t resist slapping that into the terminal as is :frowning_with_open_mouth:

3 Likes

sorry for the long reply, i pasted the command in the terminal the right way and now pulling and committing doesn’t throw an error but now it does nothing. pushing however still throws an error saying

Pushing changes…
Writing objects: 0.0%

Push upload to remote failed

I have a feeling its because of how I cloned the git since I used SSH instead of HTTPS

1 Like

how’d you get connected to your Glitch project repo via SSH?

1 Like

I just pasted the git url in and it cloned it

1 Like

glitch gives HTTPS git urls, so is it possible that this whole thing wasn’t working because you were pushing to somewhere other than glitch?

1 Like

Maybe but it cloned perfectly

1 Like

what was the SSH URL? redact any tokens if necessary

1 Like

do I have to? the project includes my real name my name is not ‘someone’ ik big woop and I don’t want to reveal it yet. but all I did was just copy the project’s git and it worked

1 Like

you can redact the name too (:

but I’m still curious

1 Like

any project will work though

1 Like

https://(token)@api.glitch.com/git/(project name)?

2 Likes

I signed out for this

https://[email protected]/git/sepia-gamy-cook

2 Likes

thanks for checking. that’s an HTTPS url, not an SSH url, so it shouldn’t be a problem related to ssh

1 Like

This time I cloned my git with the https method and it cloned perfectly. However pushing, pulling, and committing does nothing but when you push it still throws an error

2 Likes

they shouldn’t do anything, right? i.e. you’ve made no changes to push/pull/commit?

can you show your git config, just to make sure the above denyCurrentBranch thing stuck?

1 Like

I did make changes

All i did was paste the following into the terminal

git config receive.denyCurrentBranch updateInstead 
echo 'refresh' > ./.git/hooks/post-update
chmod +x ./.git/hooks/post-update
1 Like

hm and that even looks fine

still throws an error

is it a different error then?

1 Like

yes it does throw the same error

1 Like

can you post the detailed error? maybe there was a problem other than the branch being checked out on the remote all along

1 Like

I provided a gif below, you can see that the branch is ‘master’

The gif

image

1 Like

ouch, that’s really all that it says

any chance the command line git has more detailed info?

1 Like

nope it doesn’t :sweat:

1 Like

But it doesn’t say the exact same thing, does it?

1 Like

unfortunately it does

1 Like

All the more mysterious, because that error message isn’t even in the Git source code.

1 Like


There are a few messages along the lines of it in the source code.

1 Like

I wish it were one of these, so we could get a more precise idea of what’s going wrong

1 Like

the app im using is also on a website called code sandbox

1 Like

update: is anyone going to go to it to help me?

if you’re still interested, could you send a screenshot of what happens when you do it from the command line git? include the command

2 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.