Today, my notebook started to freeze, so I decided to reinstall the system.
By the way, review the use of git local commands
1, configuration
2 Skip the general operations first. Introducing the operation of linking to github remote library
My two keys are in the C:\Users\bond\.ssh folder. Open id_rsa.pub and copy all the contents inside. Then go to the ssh key setting page of github to add key.
Two points to understand: First, GitHub requires an ssh key to identify whether the submitted content is your own operation.
Second point: Github allows you to add multiple Keys. Suppose you have several computers, and you submit them at the company and at home. As long as you add the key of each computer to GitHub, you can push it to GitHub on each computer.
3. Clone/upload from remote library to remote library
Clone is relatively simple, just one line of code is ok
$ git clone git@github.com:hewasdrunk/test3.git
Updating the upload code requires a little more basic operations. I just took the jpg I made some time ago.
There are other commands: as follows
git log View the contents of each modified version
git status Check whether you submitted the request
git diff test1.html View modified content
Generally speaking, as long as git knows and uses the information I listed, it is already qualified.
The above is the detailed content of git bash upload code to github. For more information, please follow other related articles on the PHP Chinese website!