Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GITHUB help -- pls
#1
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...
Reply
#2
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
Recommended Tutorials:
Reply
#3
(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.
Reply
#4
Local is your computer. Don't inIt the read me on the site but through the terminal
Recommended Tutorials:
Reply
#5
The only thing you do on the site with a browser is create the repo....nothing else
Recommended Tutorials:
Reply
#6
(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...
Reply
#7
im using 2.7 git version and i dont have that problem.
Recommended Tutorials:
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020