install
https://git-scm.com/downloads
Select the corresponding version to install, for example, I install it on my own computer. Select 64 bit git for windows setup in windows
After downloading, select the default to install.
Download code from git repository
Right click the local folder where you want to save the project code on GIT. Git bash here opens the GIT command interface.
Enter the command here (the address on the right is copied from the GIT project website)git clone [email protected]
Fatal: could not read from remote repository
Generally, this kind of error is that there is a problem in the configuration of GIT client of the account that you log in to git, resulting in no permission to go to col ne. My solution is to delete the reconfiguration key.
Click settings
First, generate SSH key: input it in Git bash interfaceSSH keygen - t RSA - C "XXX"
There will be some problems after input. Press enter or Y until the key is generated. The directory where the key is located will be displayed, which is usually the. SSH folder of the user directory, where id can be found_ rsa.pub The public key is copied out and pasted below. The key is set
Then close these interfaces, re open git bash, and then enter the clone command to download the code
Upload code after local update
Git add file name
Git commit - M "Introduction"
git push origin master
This error occurs again after push, and is solved by changing the network.
Delete remote warehouse folder
Git RM - R -- cached. Idea
Git commit - M 'delete. Idea' ා submit, add operating instructions
Git push - U origin master? Synchronizes this operation to the remote repository
Some mistakes were reported
cannot pull with rebase: You have unstaged changes.
`Git status' ා check the prompt of GIT and follow the prompt
failed to push some refs to git
Git pull -- rebase origin master to merge code from remote pull + merge to local