No wordy, novice reading can also be very quick to start

  1. The base is held

Clone an existing remote repository:

  • Git clone [url]
  • Git pull Updates the local repository if changes are made to the remote repository

Initialize the repository in the local directory

  • Git init Creates a Git repository
  • Git add. (or use the filename instead.) Git add.
  • Git commit -m // Commit updates to the repository
  • Git status View modification information View the modification location
  • Git push to remote repository

Branch operation

  • Check out the branch: Git Branch
  • Create a branch: Git Branch
  • Switch branches: Git checkout
  • Create a + switch branch: git checkout -b
  • Merge a branch into the current branch: git merge
  • Delete branches: git branch -d
  1. process
  • Real development usually starts by creating a remote repository and cloning it
  • Git clone Clones remote resources to a local directory as a working directory.
  • Then add or modify files in the local clone directory.
  • Git pull can be used to update local files if you want to synchronize remote files.
  • After you modify the file locally, you can view the modified file using git status. Then use git add to temporarily add the modified file to the buffer.
  • After adding, you can add to your current workspace using git commit;
  • After the modification is complete, if errors are found, the submission can be withdrawn and modified and submitted again;
  • Finally, you use Git push to push your local changes to a remote Git repository
  1. The principle of

Git directories: Git directories are divided into four layers, three of which are in their own local git repositories, including working directories, staging areas, and local repositories. The working directory is where we modify code all the time, where we perform all the file operations; Both the staging area and the local repository are in the.git directory because they are only used to store data. The remote warehouse is in the central server, which is when we do our job and push it to the remote warehouse

Git objects: Basically, Git is a content-addressable file system (operating git directories with different commands). It stores key-value pairs and then finds values based on keys. Git has four types of objects: commit, tree, blob, and tag. Git stores a series of snapshots of files that are tracked by Git objects

Note: A “tree” object is created for each directory and a “blob” object is created for each file. Finally, there is a “commit” object to point to the root “tree” object so that we can track every commit of the project. The BLOb object corresponds to the changed contents of the file in the file snapshot, the Tree object records the structure of the directories and files in the file snapshot, and the COMMIT object records the snapshot of each file committed to the local repository

  1. graphics
  • Git as a tool also has graphical operations, here is a direct link for you to learn
  • Blog.csdn.net/qq_34842671…
  1. Present command daqo