1. What is git?
Git is a free, open source distributed version control system that can efficiently handle any project, small or large. Git is an open source version control software developed by Linus Torvalds to help manage Linux kernel development.
2. How to install git?
download link:
https://www.git-scm.com/downloads
For detailed installation instructions, please refer to the following:
https://www.runoob.com/git/git-install-setup.html
3. Basic instructions of git
git init: Initialize the warehouse
git status: View the status of the current warehouse
git add: add files to the staging area (staging area)
git checkout: switch branches or restore working tree files
git commit: Submit the temporary storage area to the local warehouse
git pull: download remote code and merge
git push: upload remote code and merge
git clone: copy a remote warehouse and clone the remote warehouse into a new directory
git reset: version rollback
The git command is as follows:
4. Examples of local project management
Step 1: Create a new initialization warehouse, git init
Step 2: Add files, git add
Step 3: Submit the file, git commit -m
Step 4: After modifying the file, re-add and submit
Step 5: View log, git reflog
Step 6: Roll back to the original version, git reset --hard
Open the test file, the letters are changed back to numbers, and the results are as follows:
Using git to achieve project management can facilitate project management.
Welcome to pay attention to personal public number: