-1

I'm stuck here in the process of uploading. $ git push -u origin master To https://github.com/akhilrajarj/Digiledge.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://github.com/akhilrajarj/Digiledge.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.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
AkhilRaj
  • 41
  • 1
  • 8

2 Answers2

2

As noted by your error message, your current branch is not up to date with the remote.

In order to push to the remote, you must first pull all changes from the remote to your local machine. You can use git pull to accomplish this.

There is a chance that this will result in a merge conflict if you have made different changes to the same portion of a file. This can be resolved manually or by using GUI tools. Once the conflict, if any, has been resolved, you should be able to git push to the remote as normal.

Andrew Fan
  • 1,313
  • 5
  • 17
  • 29
0

You can forcibly push to origin using this command mentioned here

But keep in mind, you may lose some history points in the remote branch

Amado Saladino
  • 2,114
  • 23
  • 25