Python Forum
GITHUB help -- pls - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: General (https://python-forum.io/forum-1.html)
+--- Forum: News and Discussions (https://python-forum.io/forum-31.html)
+--- Thread: GITHUB help -- pls (/thread-9024.html)



GITHUB help -- pls - mepyyeti - Mar-17-2018

This board seemed the appropriate place to post this.

I figured to throw up some of (working) python script on github (git version 2.14 on my linux). I set up an acct AND base repository (just the obligatory readme.md). I followed the instructions on lifehacker github installer guide

On Github if I click README.md, its text is foo. Obviously something went thru but I'm confused....

please help.

Output:
me@me-ubuntu:~$ git config --global user.name "mepyyeti" me@me-ubuntu:~$ git config --global user.email "[email protected]" me@me-ubuntu:~$ mkdir foo me@me-ubuntu:~$ cd foo me@me-ubuntu:~/foo$ git init Initialized empty Git repository in /home/me/foo/.git/ me@me-ubuntu:~/foo$ touch README me@me-ubuntu:~/foo$ git add README me@me-ubuntu:~/foo$ git commit -m 'first commit' [master (root-commit) b5f8aa9] first commit 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 README me@me-ubuntu:~/foo$ git remote add origin https://github.com/mepyyeti/foo.git me@me-ubuntu:~/foo$ git push origin master Username for 'https://github.com': mepyyeti Password for 'https://[email protected]': To https://github.com/mepyyeti/foo.git ! [rejected] master -> master (fetch first) error: failed to push some refs to 'https://github.com/mepyyeti/foo.git' 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. me@me-ubuntu:~/foo$ git --version git version 2.14.1 me@me-ubuntu:~/foo$
pls advise??? thx...


RE: GITHUB help -- pls - metulburr - Mar-17-2018

It looks like your local is not up to date with the repo. Did you change something on the site? You dont add or edit files on the site. You add or edit them on your computer and then push the changes to the repo on the site. You need to do a git pull to update your local of whatever is on the repo that is not in your local. then change your local, then push


RE: GITHUB help -- pls - mepyyeti - Mar-17-2018

(Mar-17-2018, 11:31 PM)metulburr Wrote: It looks like your local is not up to date with the repo. Did you change something on the site? You need to do a git pull to update your local, then change your local, then push

idk what local means . All I've done on the site is 1) make new PUBLIC repo 2) initialize it with a Readme file.


RE: GITHUB help -- pls - metulburr - Mar-17-2018

Local is your computer. Don't inIt the read me on the site but through the terminal


RE: GITHUB help -- pls - metulburr - Mar-17-2018

The only thing you do on the site with a browser is create the repo....nothing else


RE: GITHUB help -- pls - mepyyeti - Mar-18-2018

(Mar-17-2018, 11:43 PM)metulburr Wrote: Local is your computer.

That's what I figured. It seems 2.14, which i have, is the latest stable version

EDIT: apparently I needed to update to 2.16 Seems to work now...


RE: GITHUB help -- pls - metulburr - Mar-18-2018

im using 2.7 git version and i dont have that problem.