Host local project files to github way -Windows10

Introduction github (From know almost):

       GitHub is a project for open source and proprietary software hosting platform, since only supports Git repository format as the only hosted, named GitHub. GitHub on April 10, 2008 formally launched, in addition to the Git repository hosting and basic Web management interface, also offer a subscription, discussion groups, text rendering, online file editor, collaborative map (report), code snippets share ( Gist) and other functions. At present, it has over 3.5 million registered users, the number of hosted version is also very much, many of whom are well-known open source projects Ruby on Rails, jQuery, python and so on. GitHub loophole last year paid $ 166,000 bounty. June 2018, GitHub acquired by Microsoft for $ 7.5 billion.

Hosted steps:

1. Download github, Computer Manager recommend downloading (download speed, safety), installation time if no special requirements, the point has been " the Next " can be.

2. Installed after entering the first stage of the project to be hosted directory, right click and select " Git Besh Here " into the command input interface.

3. Enter " git the init " will become the current folder can manage Git repository.

Appears " .git " folder you were successful (.git folder is used to track and manage Git repository, which by default is a hidden file, if invisible, set about to make hidden files visible).

 

 

4. Enter " Git the Add. " Current file folder (except .git folder) is added to the directory; enter the command " Git Status "实时查看更新的情况。

5. Enter the command " git the commit -m" First commut ", to add the project files to a local warehouse, where -m later quoted the contents of the current operation is a comment.

6. Before connecting a remote repository, let's see if the username global configuration and global configuration mailboxes. Check the user name, enter the command " git config user.name ", view mailbox, enter the command " git config user.email ." Had not configured, then global configuration user name, enter the command " git config --global user.name" " " quotes the contents of a custom user name; Global mailbox, enter the command " git config --global user.email "" "quotes the contents of the mailbox address. After configuration is complete, you can look at (the user name in the " - " is not displayed).

7. connection to a remote repository (github), first of all, get to know the local transport between the warehouse and the remote repository through SSH encryption protocol, so we need to set the SSH protocol. With this in view the path C: \ Users \ G \ if there .ssh in id_rsa (private key) and id_rsa.pub (public key) file, yes, we are using id_rsa.pub (public key) file, not to use a command to generate git, enter the command " SSH-keygen -t RSA -C" @ **** ******* "  " quotes filling mail address (single operation).

8. Log github, open Settings, find Deploy keys, right click the Add deploy key, title customization, copy the contents of the file id_rsa.pub to key in, be sure to check here on Allow write access, click Add key (again operation can).

9. Create a repository (New Repository).

10.

11. Enter "in command panel git the Add Remote Origin https://github.com/COL/rs.git " achieve a warehouse associated with the local (red fields are just copied down their own links).

12. Enter the command " git the Push -u Origin Master " all the contents of the local repository pushed to the remote repository on the (github).

Due to the new remote warehouse is empty, so to add -u this parameter, then the remote repository with content, simply enter the command again next time from the local library to upload content " git the Push Origin Master " can be.

13. After you are done, you can see whether the project is hosted on github success.

 

Guess you like

Origin www.cnblogs.com/ms-bk/p/12540536.html