What is 1.Git?
Introduction: Git is the parent of Linux Linus Trovalds, built for managing Linux kernel code, is considered the top level of distributed versioning tools. Smart, friendly, robust and efficient.
Role: Create a new branch, fetch the latest version of the code on the server, and merge it with your main branch.
Clones the database (including code and version information) from the server onto a single machine.
Create a branch on your own machine and modify the code.
Commit the code on the branch you created on the stand-alone.
Create a new branch, fetch the latest version of the code on the server, and merge it with your main branch.
Generate patches to send patches to the main developer.
2. Simple operation
Common commands
Git init git initialization
Git status lists all files in the current directory that have not yet been managed by git, and files that have been managed by git and have been modified but not yet committed (git commit).
git config--global user.name "username" Configure user name
git config--global user.email "Mailbox" configuration Mailbox
git config--list viewing user configuration information
git add "file name" submits the file to the buffer
git Add. Submit all files in the directory to the cache
Git checkout-b <name> Create new branch and switch past
git checkout <name> switch branches
Git branch View all the branches created
Git branch <name> Create new branch
git merge <name> merge name branch into current branch
git branch -d <name> Delete Branch
git branch-d <name> Force Delete branch
git push origin-d master pushes a local branch to a remote branch
Uploading files to GitHub
①git Add. Submit the file to the buffer
②git commit-m "test" to push files to a local library
③git push origin-d master uploads files to GitHub
PS: Put on my github:https://github.com/likepast.
Git Easy to use