Problem description: after creating the repository remotely on github, the following error occurs while submitting a local file using gitbash
$ git push -u origin master
fatal: HttpRequestException encountered.
An error occurred while sending the request.
Username for ‘https://github.com’: bluetata
To https://github.com/bluetata/Javascript-AngularJS.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to ‘https://github.com/bluetata/Javascript-AngularJS.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.
Problem analysis: I created the empty repository on Github first, checked the create READme.md file, but did not pull it locally when Using Gitbash. Then use gitbash to submit the local file to the warehouse, an error occurred while pushing.
Solution: error message can be seen in the local and remote matching is not complete, also found on the Internet, summed up for the local warehouse and remote warehouse conflict caused by.
The following solutions are summarized:
1: Pull the remote warehouse to the local warehouse before push
$git pull origin master #git pull –rebase origin master
$git push-u origin master
2: force push local warehouse to remote (this case does not merge, remote files may be lost after force push is not recommended)
$ git push -u origin master -f
3: to avoid conflict resolution, temporarily submit the local file to the remote branch
$git branch [name]
# after creating the branch, then push
$git push-u origin [name]
Note: This article was originally published in ‘bluetata’ on blog.csdn.net.
$ git push -u origin master
fatal: HttpRequestException encountered.
An error occurred while sending the request.
Username for ‘https://github.com’: bluetata
To https://github.com/bluetata/Javascript-AngularJS.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to ‘https://github.com/bluetata/Javascript-AngularJS.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.
Problem analysis: I created the empty repository on Github first, checked the create READme.md file, but did not pull it locally when Using Gitbash. Then use gitbash to submit the local file to the warehouse, an error occurred while pushing.
Solution: error message can be seen in the local and remote matching is not complete, also found on the Internet, summed up for the local warehouse and remote warehouse conflict caused by.
The following solutions are summarized:
1: Pull the remote warehouse to the local warehouse before push
$git pull origin master #git pull –rebase origin master
$git push-u origin master
2: force push local warehouse to remote (this case does not merge, remote files may be lost after force push is not recommended)
$ git push -u origin master -f
3: to avoid conflict resolution, temporarily submit the local file to the remote branch
$git branch [name]
# after creating the branch, then push
$git push-u origin [name]
Note: This article was originally published in ‘bluetata’ on blog.csdn.net.
Read More:
- Git failed to submit data error: failed to push some refs to’https://github.com/XXXXXXX/gif.git’
- error: src refspec master does not match any error:failed to push some refs to ‘[email protected]:xxxx
- Push failed Unable to access ‘https://github.com/‘: Failed to connect to github.com port 443: Timed
- Solve github :error: failed to push some refs to problem
- How to solve error: failed to push some refs to ‘[email protected]:……git pull conflict
- GitHub upload failed: git push error: failed to push some refs to exception handling
- git push error failed to push some refs to solution
- Error: failed to push some refs to ‘xxx’
- fatal: unable to access ‘https://github.com/xxx‘: Failed to connect to github.com
- error: src refspec master does not match anyerror: failed to push some refs to
- Git clone appears fatal: unable to access’ https://github.com/… The solution to the problem
- Failed to push some refs to
- Error: SRC refspec master does not match any. error: failed to push some refs to
- unable to access ‘https://github.com/facebook/react-devtools/‘:
- Gitpod cannot push to GitHub solution
- GitHub push ErrorThe requested URL returned error: 403 Forbidden while accessing
- Android studio push project to GitHub
- NPM installØin sprintf- [email protected] Wealth: not available https://github.com/nhn/raphael.git/ “
- Problem solving: failed to connect to github.com port 443: Operation timed out(2020.06.04)