Turn this directory into a git managed repository via the git init command
The first step is to git add Use the command to tell git to add the file to the repository:
In the second step, tell git with the command to git commit -m “ 记录信息” submit the file to the repository:
The following information is prompted:
Please tell me who is you.
Run
git config--global user.email "[Email protected]"
git config--global user.name "Your name"
To set your account ' s default identity.
Omit--global to set the identity of the This repository.
Fatal:unable to Auto-detect email address (got ' [email protected] (none)
This is prompting you to configure the user name and mailbox. Copy the code that was prompted above
git config--global user.email "[Email protected]"
git config--global user.name "Itaotao"
And then go to commit to succeed.
git pull to update your local branch
To clone a warehouse, you must first know the address of the warehouse and then use the git clone command clone.
GIT supports a variety of protocols, including https , but with the fastest ssh supported native git protocols.
Create a dev branch and switch to the dev branch
git checkout-b Dev
Delete Branch
git branch-d Dev
To view branches:git branch
To create a branch:git branch <name>
To switch branches:git checkout <name>
Create + switch Branches:git checkout -b <name>
Merge a branch to the current branch:git merge <name>
To delete a branch:git branch -d <name>
git use notes