Git pull = git fetch + git merge.
Set ignored content
For a repository, you can directly create a. gitignore file in the repository directory.
If the configuration file is global, run the following command to specify the global configuration file:
git config --global core.excludesfile=<fileName>
File Content: # starts with a comment, and the others are the file pattern to be ignored.
Git restore File
Git checkout replaces local files
Git Reset: if the file has been added by git, git reset is returned.
If git revert is a commit file, use this.
Git conflicts
Because I only have some knowledge about vim, I chose vimdiff and the command
git mergetool --tool=vimdiff
It was a bit dumpfounded and divided into four screens. The above three are respectively current local, base, and remote
The following screen is merged, and the following content is directly modified, and then wqa is done.
If the modification is complete, you can directly commit it. If you want to roll back, git merge -- abort
Git usage.