Submit the file to the GitHub project
- Git client submits a project file
- Install Git
- Git on new warehouse
- Fill in the information warehouse
- Create success, to get git address
- Submit project
- Eclipse project submitted
- Git on new warehouse
- Fill in the information warehouse
- Create success, to get git address
- Eclipse is configured warehouse
- Eclipse project submitted
Now submit the project to GitHub is very easy, you just need to have a GitHub account.
Git method describes two projects submitted, first is to use Git Bash. (Very simple)
The second was submitted in Eclipse.
Git client submits a project file
Install Git
First you have to download a good Git, all the way to download and install more than that.
https://git-scm.com/download/win
Git on new warehouse
First landing https://github.com/
then click the plus sign top right corner, click New repository created warehouse
Fill in the information warehouse
Repository name in completing the warehousename(Required),
the Description in completing the warehousedescription(Not fill),
Finally, click the following Create Repository creation.
Note:Do not check The this the README A Repository with the Initialize , may go wrong, this can regenerate back.
Create success, to get git address
Next, a second circle in fact you want to perform the operation , the copy of the code.
Submit project
To be submitted under the project directory, right click and choose Git Bash Here
copy the code previously displayed page, and add a third linegit add .
This is my copy, pay attention to your own copy.
echo "# Harvest-Game" >> README.md
git init
git add . # 添加这句
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/szluyu99/Harvest-Game.git
git push -u origin master
Within Git Bash dialog box, right click and choose Paste, can be executed.
Finished, submit success.
We can see that the project has been successfully submitted.
Eclipse project submitted
Git on new warehouse
First landing https://github.com/
then click the plus sign top right corner, click New repository created warehouse
Fill in the information warehouse
Repository name in completing the warehousename(Required),
the Description in completing the warehousedescription(Not fill),
Finally, click the following Create Repository creation.
Note:Do not check The this the README A Repository with the Initialize , may go wrong, this can regenerate back.
Create success, to get git address
This address will be used when submitting and so on.
Eclipse is configured warehouse
Eclipse, right- click the project file to upload:
-> Team
-> Share Project ...
I have here is the Chinese version, as shown below.
Out of the following dialog box,
check the Use parent Folder or in the Create Repository of Project ,
the first option is currently not hook the Project ,
click on the Create Repository , complete.
When you are done found little change in the project file.
Eclipse project submitted
Right-click on the project file,
-> Team
-> the Commit ...
in the event of Git Staging , the
selected Unstaged Changes in all files, right-click, the Add to Index ,
will be able to put them Staged Changes in.
In the Commit Message written submission of this information, click Commit And Push ...
After you create the git repository address is copied to the URL, the information that follows will auto-complete.
Continue to click Next, and click Finish.
We can see that the project has been successfully submitted.