Use GitHub for Windows to host your code in GitHub

Source: Internet
Author: User



This blog post is simply an introduction to using GitHub for Windows to host your code on GitHub, probably not too deep,

If you want to learn more about the original rational things, you can read the "Git authoritative guide" this book ~ ~ ~ I think it is very good ...



In fact, simply summarize the following, git's simple use is nothing more than upload, download, modify, import project.

The following explanations are all by default you have installed GitHub for Windows correctly.


First, upload code

1. On the GitHub website, create a new warehouse with your account (repository, abbreviated repo).

The diagram for the process is as follows:

1)



2)



3)




4) Create the appropriate project in eclipse as shown in:




5) Open the Git shell and go to the source of the project, as shown in:



6) then enter the code that you saved in the 3, and then execute it in turn. As shown in the following:



By this time, We've uploaded the readme.md file in the local repository to the GitHub server, and then we'll land on GitHub, and then we can see that in the repo we created earlier we found that with a readme.md file, the contents of the device were just we knocked on the command line In the content. As shown in the following:






Here you may be wondering why only one readme.md file is hosted on GitHub, and what I want is to host our project source on GitHub. Haha, that's because when we knocked on the command line, it was git add readme.md. Git add is followed by the file you want to upload to the GitHub server, you want to host the entire project code to GitHub, this time what to do???       You should use git add at this time. <-------Here's a little bit ...



Second, re-upload the project code after modifying the project.

The code that needs to be executed at this time is:

1) git Add.

2) git commit-m "write it casually, but it's a personal suggestion to write something that's actually meaningful, such as what changes have been made to this submission."

3) git push #这一次这样写就行了 Because the connection information has been written for the first time


As shown in the following:



At this point, when you go to GitHub, you have the latest code in that warehouse. As shown in the following:




Third, download the corresponding code.

It's easy to download the code above github, and we'll start by creating a new directory on the client side (which will serve as a Huangjundongisahandsomeboy for the demo), then clone the project using the git clone command.

The following Git clone URL can be found at the top of the first 3).


The command line scenario is as follows:



This is where we go to the corresponding folder to see the corresponding clone down the code ...



Iv. importing code into the project

Enter eclipse, click on file---import, and the following navigation bar appears. As shown in the following:




The project we chose is from Git, click "Next", this time it will appear:



At this point, we choose existing Local repository, this time click "Next", this time in the navigation bar appears click "Add", this time will appear, we click "Browse" to find the code that we just clone from GitHub. As shown in the following:




When we click "Next"------Select "Import as General Prject"----and click "Next" to complete the import of the project.
































Use GitHub for Windows to host your code in GitHub

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.