The steps to configure and use the GitHub client under Windows are as follows
- Create repository on Github, specify name, Readme.md, and LICENSE files;
- Install Git client,: https://git-for-windows.github.io/, install the open git client (git bash);
- Configure SSH keys: Enter commands in Git bash
Ssh-keygen-t rsa-c "[Email protected]"
Return or enter Yes to confirm until completed, and generate a id_rsa.pub file, the path of the file will be given during the execution of Ssh-keygen, pay attention to observe
Open and copy all the contents of the file, log on to GitHub, open account Settings, add Sshkey
Enter ssh-t [email protected] Check is successful, may prompt irrelevant information, enter Yes to confirm
- Create a local MAVEN project (need to sync to GitHub);
- Open git client (git bash) switch to MAVEN engineering root directory
Execute the following command in turnGIT init//initialize git config--global user.name "name"//set user name git config--global user.email "email" //Set mailbox Git Remot e Add [email protected]:ywlaker/uc-web.git //Add remote repository, replace it with your own username and repository name Git pull Origin master//bring the data from the repository, such as Readme file and license file git Add./* /Add Local project file git commit-m "comment"//submit to cache Git Push-u Origin master//submit to remote repository
So the project is synced to GitHub!
GitHub Client Configuration and use