Git six-line configuration

Git config –global user. Default simple git config –global push config –global core.quotepath false git config –global core.editor “code –wait” git config –global core.autocrlf input\

Git config –global –list

Note: The English name and email address above are not related to GitHub. They may or may not be the same as the GitHub username and email address.

Note: You need to ensure that code can be executed directly from the command line. If not, you need to install VSCode and configure PATH. I added C:\Users\Fang\AppData\Local\Programs\Microsoft VS Code\bin to my PATH

What Git does: Version control

If you need to go back to the current version after uploading it to Git, you can retrieve it in Git

Initialize the directory \

Git add path // Check the status // commit file 1 git commit -m "version 1" // commit file 2 (recommended) git commit -v // open the current directory start If you have three versions and you cut to the second version, Git reset --hard XXXXXX -- git reset --hard XXXXXX -- git reset --hard XXXXXXCopy the code

Create a.gitignore file and enter the file name of the file that you don’t want to upload into the common file that doesn’t need to be submitted: node_modules.ds_store.idea.vscode

How to develop multiple lines

Git branch x // Create a new branch based on the current commit. Git status -sb // Delete the branch git branch -d xCopy the code

Note: There may be conflicts during branch merging. To resolve conflicts, keep what you want, delete what you don’t want. Delete the less than sign at the beginning and the greater than sign at the end and the equal sign in the middle