MacOS Github Push项目 精简版步骤

大白菜教程:小白菜 macOS github提交代码-CSDN博客

bash 复制代码
步骤1:git init

步骤2:
touch .gitignore       创建ignore文件
open .gitignore        打开ignore文件
编写ignore文件
  .idea/  是文件夹的意思
  .git/ 也是自动生成的文件夹 也不上传
  .DS_Store 苹果自带的文件也不上传上去
  带 / 是文件夹的意思
  还有两个很大的权重文件也不上传,给的是相对路径
 
步骤3:暂存区域
git add .
git status

步骤4:提交
git commit -m "提交显示的字符串 可改"
git log

步骤5:建立远程仓库

步骤6:连接远程仓库 并 查看连接状态
git remote add 【origin 远程仓库的名字 】【url 去远程仓库复制】
git remote -v

步骤7:获取token 免密登录
git remote set-url origin https://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@github.com/dearRongerr/ZhengDaBei-V2.git

步骤8:push上去
git push -u origin main
git push -u 【origin自己之前起远程仓库的名字】 【main】
相关推荐
xiezhr1 小时前
官方文档像天书?这本开源的 WorkBuddy"蓝皮书",或许更适合小白入门
ai·github·开源软件·ai agent·workbuddy
wangruofeng10 小时前
8 小时 10000 星,xAI 把内部编码 Agent 开源了:Grok Build 的架构拆解
开源·github·aigc
胡萝卜术10 小时前
RAG 的知识炼油厂:从原始网页到可检索知识块的工程化之路
面试·架构·github
GoGeekBaird10 小时前
我用 BeeWeave 跑完了一次完整写作闭环
后端·github
wangruofeng11 小时前
2026 年 7 月 GitHub 趋势观察:Skills 生态爆发,744B MoE 跑进消费级机器
github·aigc·ai编程
风向决定发型d78215 小时前
Github Copilot 新手极速上手指南
人工智能·github·copilot
有想法的py工程师16 小时前
GPG 密钥迁移指南:多私钥备份、批量导入与自动信任
git·github
OpenTiny社区17 小时前
WebSkill - Agentic Web 面向 SaaS (Skill as a Service) 的进化
github·agent
举个栗子。19 小时前
Skill Store github 压缩包
ai·github·skills