A, Mac git
Brew install git on Mac
Create a new folder to initialize the Git repository as the project storage location
Ssh-keygen -t rsa -c [email protected]
A. Open the terminal and enter open ~/. SSH to view the id_rsa.pub file and open the copy key
B. Open the coding official website, log in successfully, click account-SSH public key, enter the value copied in step A, and click Submit
Git clone URL (SSH)
Git pull # Pull remote code updates from the project repository to the local branch
Git merge master
Git add
Git commit -m
Git push commits a local branch
Merge local remote branch to master branch
Git common operation commands
Git status Checks the file to be committed
Git branch Displays the current branch
Git checkout < branch > Switch branches
Git merge < branch