1

I follow steps in http://jekyllbootstrap.com/usage/jekyll-quick-start.html to install Jekyll-Bootstrap.

I can run

http://localhost:4000

in local and I have set ssh, but git push origin master doesn't work.

--- This is the error interface ---

$ git push origin master To git@github.com:XXX/XXX.github.com.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'git@github.com:XXX/XXX.github.com.git' 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.

Does someone know why git push origin master doesn't work?

CinCout
  • 8,291
  • 9
  • 47
  • 55
alice
  • 23
  • 1
  • 3

2 Answers2

4

The error message already tells you everything you need to solve the issue. Before a git push origin master you should do a git pull origin master to ensure you have the latest updates from the server.

If you are getting this message you did work on an older version of the repository instead of the latest one.

Knut
  • 1,692
  • 13
  • 9
0

As the error says, you need to do a pull before you can do the push. The problem is that the code you are trying to push doesn't have the latest changes from the master, so it cannot be merged correctly. Try the pull first to get all the latest changes.

beans
  • 116
  • 4