GitHub Desktop 上传流程

GitHub Desktop 上传流程

摘要:本文总结一下用 GitHub Desktop 上传代码的详细步骤。


步骤 1:打开 GitHub Desktop

如果没安装:
https://desktop.github.com/


步骤 2:添加项目路径

  1. File → Add local repository...
  2. 选择 某一个项目文件夹(例如 JSPChatroom)。
  3. 点击 Add Repository。
  4. 若该文件夹没有 Git,会提示创建:
  5. 点击 Create a repository

步骤 3:选择 Git Ignore(非常重要)

点击:

  • Repository → Repository Settings → Git Ignore

根据项目选择模板:

  • Python → 选择 Python ignore
  • Jakarta EE → 选择 Java ignore
  • Maven → 自动忽略 target/
  • Gradle → 自动忽略 build/
  • ASP.NET → 选择 VisualStudio ignore
  • Linux Shell → 选择 None(可选)

这样就不会上传垃圾文件。


步骤 4:首次提交(Commit)

右侧 Changes 显示所有文件,填写:

  • Summary:Initial commit

点击:

  • Commit to main

步骤 5:推送到 GitHub(Publish)

右上角点击:

Publish repository

设置:

  • 名称:建议统一格式,例如
    • python-chatbot
    • jakartaee-jspchatroom
    • aspnet-webapi
    • linux-deploy-tools
  • Visibility:Public 或 Private

点击 Publish。

完成。

相关推荐
阿智的AI开发笔记1 小时前
充了 200 块只跑出 3 条:AI 视频真正贵的地方,是「按次」和「按秒」的区别
github
GitHub实测笔记2 小时前
rtk 本机实测:给 AI Agent 砍掉 90% 的命令行噪音(Linux)
github
小莫4612 小时前
CI 全绿了,测试却可能是假的:GitHub Actions 三个静默失效的坑
github
dreams_dream4 小时前
项目想要推送多个平台仓库的方法
gitee·github
AI_Lab014 小时前
服务器管理工具要在服务器上装 Agent,安全吗?
服务器·安全·github
七牛云行业应用4 小时前
DeepSeek Harness 插件架构 vs MCP:Cordis 的「Everything is a Plugin」到底解决什么
ai·github·ai编程
u1301305 小时前
GitHub 热榜项目:日榜(2026-10-30)
人工智能·github
AlfredZhao5 小时前
新项目首次提交 GitHub 报错“未配置远端 origin”怎么办
github
miofly5 小时前
GitHub 日榜趋势速报 | 2026-10-31
开源·github
u13013017 小时前
GitHub 热榜项目:日榜(2026-10-29)
人工智能·github