GitHub's use (Git Shell)

Source: Internet
Author: User
Tags git shell

I am not clever and understanding something are not quick. Even so,i can ' t be scared for facing it. Practice more and practice more. Don ' t stop your passion.

Recently to work on GitHub with small partners to do projects, my github .... Only use the client's graphical interface to play = =. What pull Request,commit theoretically knows the point, but I never play git shell. Recently encountered a problem, fork someone else's project, then clone to local, when I found someone else's project on GitHub to be updated, then open my local project ... Local projects can not be synchronized ah, this can do! It's like a kid's paper that no one wants. As a child he has to study command line immediately. Start with the simplest of learning.

First, login to their own github, create a new warehouse, named "Test", the warehouse description can not write, anyway, is to learn git.

Second, after the successful creation, you will see that GitHub has given a few command lines to show. (Novice says it is still not sure how to use these things, decisive first ignore it)

Third, open the Git Shell (when you install the GitHub client locally, you can have a cat on the desktop, which is the graphical interface.) You can also see another git Shell, which is the command-line tool)

Four, double hit Open git Shell (you will see the command panel has shown a path, do not control it OH)

V. Enter git config--global user.name "xxx" here "xxx" is your github user name

Six, input git config--global user.email "xxxxx" Here "xxxxx" is your registered mailbox, if you do not remember the email address, you can click on your github, on the drop-down menu to find settings, click Settings, You can see the email in the navigation bar on the left, and then you can see the email address when you sign in. It's going to have a primary mark!

Seven, the above two steps to configure your Git account on the client, and then build your own version of the repository. Enter CD e: Switch to the E-drive directory.

Enter mkdir test to create a test directory, note that the local repository name is the same as the repository name established in Git . (see named name of Step one)

Nine, enter the CD test to enter the test directory

Enter GIT init initialization test version of the warehouse, this time you go to the e-disk, find the test folder, enter the folder, you will see a. git folder, this is the initialization file.

Xi. Enter the touch Readme to create a Readme file, this time you will see a readme file in the test folder

12, open the Readme file with a text editor, enter some content casually, for example: Hello git!, then save it.

13. Continue to enter git add README in git shell to add the file to the upload queue

14, input git commit-m ' test commit ' cache submission, quotation marks are the description of this submission, must be filled in.

XV, enter git remote add origin https://github.com/XXX/test.git note the URL format, XXX is your GitHub username, test is the name of the repository you just built

16. Enter git push orign master to upload the Readme file to the repository. This time you open the test repository on GitHub and you will see the Readme file that was successfully submitted.

GitHub's use (Git Shell)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.