Git init this command can create a repository in any directory at any time, completely local.

Git clone to do this, you need to type the url of the project you want to clone. Git clone will clone all the contents and records of the master branch of the project in your local location.

Git add adds the modified file to the cache. It is important to note that both new files and files with committed records need to be added to the cache. To use git add, type the name of the file you want to add to the cache after git add. If there are multiple files, separate them with Spaces. If you commit them all, use git add. To implement. Any unadded changes do not appear in the cache.

This command can be used to store files temporarily (temporarily) before you run git add. Git stash list, you can see all of your stash lists. Git stash pop stash@{num}, you can restore git stash@{num}, you can restore git stash@{num}, you can restore git stash@{num}. Git stash clear

Git status This command displays the status of files in the working directory and in the cache. Git status -s displays a brief list of file status. The first line is the cache status and the second line is the working directory status. If -s is not added, the detailed status of the file is displayed.

Git diff this command displays changes that have been modified but not yet cached. Changes to each row are displayed. Git diff –cached to view cached changes. Git diff HEAD looks at all cached and uncached changes. Git diff –stat, which displays only a summary of the changes, does not display the complete changes, and is more detailed than git status.

Git commit This command commits the cached files to the repository. To commit, enter git commit -m. Git commit -a puts all the modified files into the cache, but you still need to use git add to add new files to the cache.

Git rm This command will completely remove the modified file from the cache. By default, the modified file will be directly deleted from the local working directory. If you don’t want to delete it from your local directory, use git rm-cached

Git branch This command will check your local branches. Git branch -d specifies the name of a branch that you can delete

Git checkout This command allows you to switch branches. Use git checkout -b branch name to create a new branch and switch to it.

Git merge This command merges any branch into the current branch. When there is a conflict, after manually merging the conflict, you need to use git add to tell Git that the conflict has been resolved.

Git log — oneline Git log — oneline Git log — oneline

Git tag This command adds a tag to a record, usually when a release is made. Git tag -a v1.0 git tag -a v1.0

Pull git pull from the remote repository. This command will fetch new data from the remote repository. Git fetch, which is followed by the git merge command, merges data from the remote branch into the local branch.

Git push pushes data from local branches to remote repositories. Git push Local branch name Remote branch name. This command pushes the local branch to the specified remote branch.