Git, Eclipse submit the project to GitHub fool-operation

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
Here Insert Picture Description

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.
Here Insert Picture Description

Create success, to get git address

Next, a second circle in fact you want to perform the operation , the copy of the code.
Here Insert Picture Description

Submit project

To be submitted under the project directory, right click and choose Git Bash Here
Here Insert Picture Description
copy the code previously displayed page, and add a third linegit add .

Here Insert Picture Description
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.
Here Insert Picture Description
Finished, submit success.
Here Insert Picture Description
We can see that the project has been successfully submitted.
Here Insert Picture Description

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
Here Insert Picture Description

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.
Here Insert Picture Description

Create success, to get git address

This address will be used when submitting and so on.
Here Insert Picture Description

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.
Here Insert Picture Description
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.
Here Insert Picture Description
When you are done found little change in the project file.
Here Insert Picture Description

Eclipse project submitted

Right-click on the project file,
-> Team
-> the Commit ...
Here Insert Picture Description
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.
** ** bold style
In the Commit Message written submission of this information, click Commit And Push ...
Here Insert Picture Description

After you create the git repository address is copied to the URL, the information that follows will auto-complete.
Here Insert Picture Description
Continue to click Next, and click Finish.
Here Insert Picture Description

We can see that the project has been successfully submitted.
Here Insert Picture Description

Published 170 original articles · won praise 47 · views 20000 +

Guess you like

Origin blog.csdn.net/weixin_43734095/article/details/104915968