先建立Maven Webapp项目git
图文详解MyEclipse中新建Maven webapp项目的步骤(很详细)github
在web项目的路径中右键(前提是你机器已经装了git)“Git Init Here”,会生成一个.git文件夹web
接着在myeclipse中右键项目,选择Team>Share Project>git>选择有.git目录的路径,也就是上面的文件目录,注意还要修改生成的.gitigore,避免上传没必要要的文件windows
右键,选择Team>Commit,勾选文件后选择CommitAndPush,填写GitHub上的项目https连接,输入账号密码就OK了app
注意:若是第二次push到github上myeclipse须要重复输入账号密码的话,能够按照如下方法解决eclipse
windows>preferences>team>git>configuration>respository settings,选择对应的项目,打开Location文件修改为以下内容:webapp
[core] repositoryformatversion = 0 filemode = false logallrefupdates = true [remote "origin"] url = https://git.oschina.net/herryandalice/JavaStudy.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] remote = origin merge = refs/heads/master
其中url对应的是项目的地址fetch