Today I’ll take a look at some of the problems I’ve encountered with using Git.
1.Git Authentication failed for identity Authentication
This problem can be solved by deleting the credentials as follows.
Delete the credentials and re-enter the user name and password. You can also control it.
2. The file name is case-sensitive
Git config core.ignorecase false git config core.ignorecase false However, there will be some occasional problems. I recommend changing the name to a.HTML after submitting, which is safer.
3. Simultaneously push to multiple warehouses
Git /config:
4. Set different user names for different projects
Every Git project has a hidden.git folder where you can modify its config file.
Git config user.name “XXXXX” git config user.name “XXXXX”
5. Undo the modification
Git is divided into workspace, staging, local repository, and remote repository. Git add., git commit -m, and Git push correspond to operations from one part to another. Plus the initial status, there are five states: unmodified, modified, temporarily saved, submitted and pushed. Git diff allows you to see what was changed in each step. After that, you can try to undo the operation.
5.1 Modified, not temporarily saved
You can do this using git checkout. Or git reset –hard.
5.2 Temporary storage, not submitted
Git reset and git checkout. Or git reset –hard
5.3 Submitted but not pushed
Git reset –hard origin/master
5.4 has been pushed
In this case, you need to restore the local and then perform a Git push to the remote repository.
Git reset –hard
Day 4, over~