如何在IDE中使用Git上传代码到Github

步骤

先添加用户:
“Window”->”Preferences”->”Team”->”Configuration”,没有账号的话点击”Add Entry”来添加账号

创建仓库:
右击文件夹->”Team”->”Share Project”,选择文件->”Finish”

设置commit:
右击文件夹->”Team”->”Commit”->填写Commit Message->”Finish”

将本地仓库推向远程仓库:
右击文件夹->”Team”-> “Remote”->”Push”->填写用户名和密码->”Finish”->下拉都选择”master[branch]”->”Finish”

这样就成功的在IDE中使用Git了

期间可能遇到的问题

如果在设置commit的时候出现“there is no staged files”,以下是解决方法:
1、 “preferences’->“git”->"committing "
将use stage view to commit instead of commit dialog 的勾去掉
2、 “team”->“commit”,就可以了

猜你喜欢

转载自blog.csdn.net/weixin_41879093/article/details/82952431