Svn has been used previously to manage the code, now the company's new code uses github, learning to record, prevent future forget
1. Check your eclipse plug-in has not been installed github] [EGit by Help-About Eclipse IDE
If there is no installation can eclipse the market to search for and install] [Help-Eclipse Marketplace
3. Set github user information [Windows-Preferences-Team-Git-Configuration]
Click Add Entry to add: Enter your email address and user name github here
4. Local projects submitted up to github
Github up to create a warehouse
Local Project Right [Team-Share Project-Git]
First need to select the projects submitted
Then click Create Repository-Finish
In this directory will generate a .git folder, then files are displayed in Eclipse? number.
1. go Window-> Preference-> Team-> Git-> Committing, the first checked by default remove a [submission will not check this code, operating somewhat cumbersome]
2. Add as a new file Index, Right Project -> Team-> Add to Index, where all the files with a + sign for the files do not need to submit, you can through the right -> Team-> Remove from Index removed
3. Select the local code requires ignored and documents submitted
Select the eclipse of the Navigator mode
Select the file you want to ignore
You can also choose to simply ignore a folder, then you can view the contents are ignored in this document .gitignore
4. Right-code to be submitted to the local warehouse project [Team-Commit Message] fill in the information, and select the file you want to submit a
5. Place the code submitted to the remote github project right up [Team-]
6. Fill in the address of the warehouse you created on github:
Copied directly to the address on GitHub
Source ref select master
Then you can see the uploaded project code on github
========================================================================================
After the push has always need to enter the address of the remote push very annoying
Solution:
the Eclipse -> Window -> Team -> Git -> There Respository configuration, Respository Settings top, find your current project, click on the right side open, will open the git configuration.
git configuration file as follows:
You can copy and then modify:
[core]
repositoryformatversion = 0
filemode = false
logallrefupdates = true
[remote "origin"]
url =https://github.com/用户名/项目名.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
---------------------
After submitting you will not need to fill in the address