"Failure" to export to github


#1

So im trying to export my project to github, and it sometimes works, but sometimes it says “Export successful”, but then reloads the page and there are no commits on the github project.

Any idea what might be causing this or how to patch it?


#2

Hello @EternalFrostOrig

You can try to use the console (Logs -> Console ) and you can execute the following git commands:

git init
git remote add origin https://github.com/user/repo
git add .
git commit -m "Initial commit"
git push -u origin master

#3

Let us know if you see any errors in your browser console and what they are when you export and it fails in this way and we can look into what happened.


#4

Well there doesnt seem to be anything in the browser console, at least anything I can catch before it reloads the page


#5

I tried that, here are some things that came up

$ git remote add origin https://github.com/EternalFrostOrig/H2HL
fatal: remote origin already exists.

Not sure if this one if important or just saying that Ive exported to there before

$ git commit -m "Test commit"
On branch master
nothing to commit, working directory clean

which is odd because I know for sure I have changes

$ git push -u origin master
Username for 'https://github.com': EternalFrostOrig
Password for 'https://EternalFrostOrig@github.com': 
To https://github.com/EternalFrostOrig/arrasio
! [rejected]        master -> master (fetch first)
error: failed to push some refs to 'https://github.com/EternalFrostOrig/arrasio'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

Which is not the directory I specified before, that had a fatal error


#6

Try doing:

rm -rf ./.git
git init
git remote add origin https://github.com/user/repo
git pull
git add .
git commit -m "Initial commit"
git push -u origin master

#7

Well, that worked all the way until the final steps (I did a git pull . after it gave me an error saying to try a pull before I pushed again)

$ git pull .
From .
* branch            HEAD       -> FETCH_HEAD
Already up-to-date.

$ git push -u origin master
Username for 'https://github.com': EternalFrostOrig
Password for 'https://EternalFrostOrig@github.com': 
To https://github.com/EternalFrostOrig/H2HL
! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/EternalFrostOrig/H2HL'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

EDIT: I just tried it on the project page (where I would do it without the console) and it worked fine, no idea why