eclipse - 将代码从 eclipse 提交到 GitHub

标签 eclipse github

如何使用 eclipse 将代码提交到 GitHub 服务器?

当我运行这个命令时

git push -u origin master

显示如下错误

error: The requested URL returned error: 403 while accessing https://github.com/something/something

最佳答案

我不是专家,但我做过一次

认为简单直接的方法是

1.下载Git到你的系统

2.cd 到你的eclipse prject cd/workspace/sampleproject

3.命令

git config --global user.name "Your Name Here"
git config --global user.email "your_email@youremail.com"
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/gitusername/reposname.git
git push -u origin master                   this line may throw an error but no problem

4.从eclipse ->Help->eclipse marketplace ->搜索'git' -> 安装'Egit-git team provider'

5.进入eclipse ->Windows ->Open perspective ->Git repository

6.从左侧的“添加现有本地存储库”的 Git 存储库 View ,然后浏览到“/workspace/sampleproject”

7.现在右键单击这个添加的存储库位置并添加评论按提交。

8.现在右击这个添加的Repository点击Push

      By default Configured remote repository should be checked then press Next
      From Source Ref and Destination Ref  Select HEAD    //you may change if u want
      Select next give your github username and password then click on Finish.

关于eclipse - 将代码从 eclipse 提交到 GitHub,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14495934/

相关文章:

android - 添加黑莓后,无法在 Eclipse 中使用 Android 构建项目

java - 抽屉项目名称显示为 0

git - 您可以在工作目录中的不同文件上应用相同的提交吗?

github - 使用 Jekyll 时如何处理 GitHub Pages 中的 404

git - 如何使用GitHub的在线比较 View 来显示两个分支的 "just the file contents"的差异?

Vim,缩进不保存

Git稀疏 checkout 没有得到任何文件夹

java - Eclipse 中的 Spring 可视化 - UML 图等 - 开源

eclipse - P2 Touchpoint chmod 不起作用?

eclipse - Netbeans 或 Eclipse 哪个更好(在支持、难度等方面)来开发插件?