On win10, cannot find command ‘git’ appears because Git is not installed
resolvent:
Then enter CONDA install GIT
On win10, cannot find command ‘git’ appears because Git is not installed
resolvent:
Then enter CONDA install GIT
code
devicePositionType := strconv.Atoi(info[0]["device_position_type"].(string))
report errors
Multiple-value strconv.Atoi() (int, error) in single-value context
This is because the returned data has two parameters, and only one is defined in the code, so the code needs to add another parameter, which is generally defined as err
devicePositionType,err := strconv.Atoi(info[0]["device_position_type"].(string))
But I can’t use err. If I don’t use err, go will still report an error
Unused variable 'err'
So it needs to be written like this
devicePositionType,_ := strconv.Atoi(info[0]["device_position_type"].(string))
It means that I will not call it later, and I have defined two parameters and will not report an error
Error reporting environment: vscode + git 2.28.0. Windows. 1 + gitee code management
Error content:
When using vscode to push code to gitee, use git push origin develop:develop After
, the following error occurred.
// An highlighted block
remote: This repository(including wiki) size 1418.54 MB, exceeds 1024.00 MB.
remote: Push rejected for repository size exceeds limit.
remote: HelpLink: https://gitee.com/help/······
remote: Repository GC: https://gitee.com/······
remote: Enterprise Edition: https://gitee.com/······
To gitee.com:filename.git
! [remote rejected] develop -> develop (pre-receive hook declined)
error: failed to push some refs to 'gitee.com:filename.git'
resolvent:
The total number of warehouse files in gitee is too large, which exceeds the upper limit of gitee storage. After streamlining the warehouse files, successfully push
.
An error occurred during a git pull:
LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
Solutions:
git config --global --unset https.proxy
git config --global --unset http.proxy
Git: fatal: refusing to merge unrelated nothing is solved
Today to create a local warehouse (README), the local warehouse and making the association, found that the git pull, git feach remind fatal: refusing to merge unrelated nothing
access to the Internet to check the reason was that the two branches are two different versions, and have different submission history
add
$git pull origin master --allow-unrelated-histories
Can allow irrelevant history to mention, forced merger, really solved this problem, thank you
An error of Git
Sometimes there are some problems in the process of using Git, so when you solve each problem, you need to summarize and record it, so that you won’t do it again.
A, fatal: refusing to merge unrelated nothing code>
Today, while creating a project with Git, the following error occurred when two branches were merged.
~/SpringSpace/newframe on master ⌚ 11:35:56
$ git merge origin/druid
fatal: refusing to merge unrelated histories
The key to the problem here is: fatal: refusing to merge unrelated nothing code>
you might be in the git pull code> or
git push code> are likely to encounter, this is because the two branches without relationship. So what's the solution?
Second, solutions
Behind the commands you add - allow - unrelated - nothing code>
for example:
git merge master - allow - unrelated - nothing code>
~/SpringSpace/newframe on druid ⌚ 11:36:49
$ git merge master --allow-unrelated-histories
Auto-merging .gitignore
CONFLICT (add/add): Merge conflict in .gitignore
Automatic merge failed; fix conflicts and then commit the result.
If you are a git pull code> or
git push code> to
fatal: refusing to merge unrelated nothing code>
in the same way:
git pull origin master - allow - unrelated - nothing code>
and so on, this is the perfect solution to cough up!
fatal: Authentication failed for ‘http:xxxxxxxxxx.git/’
The solution
1. git config –global user.name “username”
Git config –global user.email “email” git config –global user.email
2. Git config –system –unset credential
3. Control Panel – User Account – Voucher Manager – Ordinary Voucher, modify and delete the git password in it
Reproduced in: https://www.cnblogs.com/ChineseLiao/p/9400191.html
Git will automatically save the user name and password you have entered.
Git’s configuration file is ~ /.gitconfig. GitConfig can be opened with Vim ~/. GitConfig from the command line of Git Bash and Mac under Windows.
Windows
git config --system --unset credential.helper
Mac
sudo git config --system --unset credential.helper
Reproduced in: https://www.cnblogs.com/sea-breeze/p/9174557.html
Fatal: Unable to create ‘project_path/.git/index.lock’ : File exists.exists
The solution
rm -f ./.git/index.lock
on Windows
del .git\index.lock