Due to the excessive number of articles in Add. I was impatient and just used the task manager to turn off idea. After restarting idea to update. Gitignore file, Error Building Trees are submitted.
The solution
Force reset Git
git reset --hard
div>
[How to Fix] fatal git-write-tree error building trees
https://stackoverflow.com/questions/5483213/fatal-git-write-tree-error-building-trees
How to Fix
git reset --mixed
Solve github :error: failed to push some refs to problem
**
The error code is reported as follows
* *
To [email protected]:Fu4ng/Cpp.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to '[email protected]:Fu4ng/Cpp.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.
The solution
The problem arises because you do not have a READme.md file in your local library
The solution is also simple
enter git pull --rebase origin master
to pull down the MD file on github.
You can successfully upload your code by typing in the Git push-u Origin Master.
[Git & GitHub] Solution: error: failed to push some refs to’https://github.com/xxxx.git’
$ 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 error failed to push some refs to solution
Problem specification
When we found a problem in the Github repository, you changed it online on Github; Or you can just add a README file or something to a library on Github without synchronizing it. Push fails when you have a commit again to commit from the local library to the remote Github library.
I edited a file online in github library, and it was not synchronized to the local library. After that, I added the file test.txt in the local library and tried to submit it to github, but the following error occurred: error: failed to push some refs to.
A statement in advance
For the code lost in the comments, it should be emphasized again that the base should be used with caution, and the branch should be determined before operation. In this case, the master branch is taken as an example, and the loss of the code caused by the wrong branch should be taken as the consequence.
The solution
The problem is that the remote library is inconsistent with the local library, so we can just synchronize the remote library to the local library. Note: I use the master branch here, please change the branch according to your own development branch.
git pull --rebase origin master
This directive merges updates from the remote library into the local library – the rebase function is to cancel the commit from the local library and connect them to the updated version library.
The following is a graphical explanation of the occurrence and resolution of the error situation
git pull –rebase origin master means to cancel commit records, temporarily save them as patches (in the “.git/rebase” directory), synchronize the remote repository to the local repository, and finally merge the patches into the local repository.
will then be able to push the local library into the remote library.
Error: SRC refspec master does not match any. error: failed to push some refs to
after being associated with the remote warehouse,
when we push the file from the local warehouse to the online warehouse through the push command
has the following error
error: src refspec master does not match any.
error: failed to push some refs to
common cause:
1. The local git repository directory is empty
2. Local warehouse add not commit
3. Git init error
use the command git add + file name , add the file to the repository, and then push normally.
p>
here are some of the errors I made while operating.
****************************************************************************************
when add HTML files in a double 叒 error p>
and then use git status to check the file status, found that the three files are still associated with the remote warehouse SSH file, the original file path is wrong,
and then switch the path, git add file, push file to finally submit the local warehouse to the online warehouse
p>
Failed connect to github.com:443 ; no error and the remote end hung up unexpectedly
while using git in combination with github to submit code to github today, an error was reported as follows:
1: Push failed: failed with error: unable to access “https://github.com/cmshome/HelloWorld.git/” : failed connect to github.com: 443; No error
2: Push failed
span> failed with The error: The remote end hung up unexpectedly
span> The remote end hung up unexpectedly
span> RPC failed; result=7, HTTP code = 0
ouch, a random search on the Internet, it is the need to set up what git proxy, but there is no actual screenshot of what, you can refer to.
and luckily, we’re done. Write down solutions to problems.
first look at the following two pictures:
, this graph is the log of all the errors. At the beginning, I kept pushing, but at the end, it was a success.
so let’s see what version of git is in my local computer. Details are shown in the figure above.
when I installed it on my computer, there were two ICONS:
is the same as your question. The key to viewing the above version and solving the problem has to do with “git shell”.
:
:
and then, this line of command, post, as follows, for friends who encounter the same problem to use:
git config –global http.proxy “localhost:1080”
is the command that saved me from fire and water and helped me a lot.
there is a prerequisite:
because, my own computer USES over the wall tools, is to have their own VPN, and is turned on. For details on which VPN tool I’m using, see the icon below:
, I don’t know, will not over the wall after setting this, will also be perfect to solve the problem?
below is the link to version control of the project that I practiced on Windows in conjunction with IntelliJ IDEA 2017.1 x64 editor:
win 7 64 bit IntelliJ IDEA details how to use GitHub(git) for project version control and management
article has my cloud disk share of the tools I used to implement this version management function at the time.
think this article useful, don’t bother, just point a like, if dislike trouble, also trouble point a like, if really don’t want thumb up, it is not can not.
but if you want to put your foot on it, get out of here, here, here.
watch out for my 30-meter broadsword. Hem. Think of all afraid!!
Remote: http basic: access denied, fatal: authentication failed for error resolution: wrong password
encountered a problem with git denied, fatal: remote: HTTP Basic: Access denied, fatal: Authentication failed for.
searches for a number of solutions that don’t work, including deleting credentials and retyping the git account name password.
later, I tried to log in git with the git password I filled in when I clone git, but the result gave an error, saying that the password was incorrect.
then I analyzed and found that the git drop code gave an error, because when I was creating git, I did not notice that the capital lock was opened. The password I entered was A123456, but I thought it was A123456. Then when logging into git account, I chose “remember account name and password” and did not enter it manually. Then, the Git password I entered when Git Clone pulled the code was a123456.
this caused me to fail to pull the code, and I never found the problem. The question puzzled me for two days. (I only noticed this when I had a brainwave and chose to enter my password manually to log into Git accounts.)
p>
therefore, if all other possibilities have been ruled out, check your git account and password to see if they are correct.
p>
, I hope that helps you.
GitHub desktop upload file error commit failed – exit code 1 received
colleague handover Java project, want to upload to GitHub
USES GitHub DeskTop to clone the warehouse to local
ready to upload file, popup error report Commit failed – exit code 1 received
after I learned that this project may exist on GitHub before, the. Git file in the project needs to be deleted
.git is a hidden file. Windows sets to display the hidden file in view attribute. Mac can see
directly in access
delete it, note here that there is a. Git, do not delete this, to delete the project exists. Git [has been tested]
but after I deleted it, GitHub DeskTop was unable to detect the uploaded project
remove the project repository, reintroduce the project, remove.git, and list all options in your file
these project files uploaded to GitHub, will automatically organize the folder, do not worry, smooth upload.
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
problem description: implement the sh -c "$(curl - fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" code> download ohmyzsh times wrong: curl: port 443 (7) Failed to connect to raw.githubusercontent.com: Connection refused
join process
Hinata% sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
reason: this is not the connection timeout, nor the certificate problem, this is not to let the connection, indicating that
is qiang
solution: fan goes out and reexecutes the command
and how to get out, I'm using the (s)(s)+polipo, (s)(s) (s) tutorial and you can search again, polipo USES which I've written before, you can look at this Linux socks5 over HTTP
Solve the MAC terminal download error curl: (7) failed to connect to raw.githubusercontent.com port 443: Connection refused
directory h3>
-
- a, error source li>
- 2, analysis and solve li>
-
- 1, test links li>
- 2, query url information li>
- 3, configuration, hosts li>
- 4, the results li> ul>
— error source
in the download node. Js package management tool, it found that incredibly connect address, the error is as follows:
p>
2. Analysis and solution
1, test link
after testing, it was found that the connection could not be connected, access was denied.
2, query url information
IP address query in
website: https://githubusercontent.com.ipaddress.com/raw.githubusercontent.com
the query results are as follows:
p>
3. Configure hosts
- a, error source li>
- 2, analysis and solve li>
-
- 1, test links li>
- 2, query url information li>
- 3, configuration, hosts li>
- 4, the results li> ul>
— error source
in the download node. Js package management tool, it found that incredibly connect address, the error is as follows:
p>
2. Analysis and solution
1, test link
after testing, it was found that the connection could not be connected, access was denied.
2, query url information
IP address query in
website: https://githubusercontent.com.ipaddress.com/raw.githubusercontent.com
the query results are as follows:
p>
3. Configure hosts
USES software called SwitchHosts, an open source tool for modifying, managing, and switching multiple hosts schemes.
download address: https://oldj.github.io/SwitchHosts/#cn
Git pull undo misoperation
git pull undo error
originally wanted to merge the newpbft on github into the local newpbft branch. Since I did not check the current branch, I directly used the git pull origin newpbft
, but the newpbft was merged into the master branch.
solution
1, run the git reflog
command to view your history of changes, as follows:
fdb70fe HEAD@{0}: pull origin newpbft: Fast-forward
40a9a83 HEAD@{1}: checkout: moving from guan to master
b3fa4c3 HEAD@{2}: commit: copy from newpbft, first init
71bf0ec HEAD@{3}: checkout: moving from newpbft to guan
71bf0ec HEAD@{4}: commit: 1. add moveStore() to clean up certStore and blockStore.
1006d67 HEAD@{5}: commit: 1. Add PBFT branch to Puppeth.
fa3fb56 HEAD@{6}: commit: 1. change some errors about packages and vars
5f40fdc HEAD@{7}: checkout: moving from master to newpbft
40a9a83 HEAD@{8}: clone: from https://github.com/yeongchingtarn/geth-pbft.git
2, then use git reset --hard HEAD@{n}
, (n is the reference to which you want to fall back) to fall back.
For example, in the figure above, git reset --hard 40a9a83