0

I am trying to git push and I am getting the following errors:

fatal: No configured push destination.
Either specify the URL from the command-line or 
configure a remote repository using

git remote add <name> <url>

and then push using the remote name

git push <name>

So then I enter:

git push https://github.com/everest- 
software/everest-web.git

And I get this:

fatal: The current branch master has no upstream 
branch.
To push the current branch and set the remote as 
upstream, use

git push --set-upstream 
https://github.com/everest-software/everest- 
web.git master

After I enter that, I get this:

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

What do I do?

chody
  • 189
  • 1
  • 1
  • 10
  • 2
    Is this a new GitHub repository? What files already exist in it? – Code-Apprentice Jul 27 '18 at 05:34
  • To add to the above question, did you _clone_ your current local repository, or is this completely new code which you then want to push to GitHub for the first time? – Tim Biegeleisen Jul 27 '18 at 05:35
  • yes new repo. Just license and read me – chody Jul 27 '18 at 05:35
  • You seem to have [the exact same problem as another person posted earlier today](https://stackoverflow.com/questions/51549407/i-cannot-publish-my-vs-code-repository-to-github/51549513#51549513). Read the answer I posted there as well as the comments for suggestions about how to solve it. – Code-Apprentice Jul 27 '18 at 05:35
  • @TimBiegeleisen new code that I want to push – chody Jul 27 '18 at 05:36
  • Please follow GitHub's documentation for how to handle this: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ ... this question is also probably a duplicate of something else. – Tim Biegeleisen Jul 27 '18 at 05:37
  • Those steps work until the last step. The push origin master doesn't work. – chody Jul 27 '18 at 05:40
  • This is my output:To https://github.com/everest-software/everest-web.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://github.com/everest-software/everest-web.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. – chody Jul 27 '18 at 05:41
  • @chody Read the link I gave above – Code-Apprentice Jul 27 '18 at 05:41

1 Answers1

1

Yes it says that your current branch is behind master branch.So you need to git pull first to make your branch tip in level with master branch.

gerrad6930
  • 26
  • 1