How to view git log in one line
The git log information is compressed into one line through a simple parameter. When using git to view the log, a large piece of information will be displayed. By formatting the log, the readability of the log can be improved, and the screen occupation can also be greatly reduced.
Git checkout file from another branch
When using git to manage code, multiple branches are usually created. We pull files from other branches, which can be achieved through git's checkout, and only need to specify the branch and file name. In this example, we pull the file1.py file of the branch1 branch under the master branch
How to undo add file in git
When using Git to manage code, you may encounter the following scenarios. The file has been successfully added through git add, and you want to undo this operation. You can use git restore to achieve this operation. In this example, we implement the undo operation on the file undofile.py that has been successfully added by git