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】
相关推荐
Sakura_j_h_28 分钟前
GitHub Actions 打包 Windows exe:中文编码与产物上传
windows·ci/cd·打包发布·github·pyinstaller·github actions
miofly33 分钟前
Meta 816B 参数 Muse Spark Open 在 NVIDIA GB300 上实现每 GPU 50K tokens 每秒
开源·github
dong_junshuai2 小时前
每天一个开源项目#148 T3 Code:把代理会话与代码工作区分开管理
github
徐小夕2 小时前
JitKnow知识库4.8发布:本体+知识图谱检索引擎,让AI回答不再“一本正经地胡说八道”
前端·vue.js·github
GitHub实测笔记2 小时前
ripgrep 本机实测:3.6G 目录 grep 7.4 秒、rg 0.12 秒,但 62 倍里有水分
github
believed_breadfruit4 小时前
我开源了一个HTML 分页导出工具,解决了复杂页面的内容截断、跨页错乱和长文档白屏问题
前端·javascript·github
不是万能的豆学长5 小时前
开源项目 public-apis 登顶 GitHub 趋势榜
开源·github
小弥儿5 小时前
38K星的开源项目 t3code:给 Claude Code 和 Codex 装一个手机遥控器
学习·智能手机·开源·github
Star(up up up)6 小时前
Docker系列---Dockerfile镜像文件
人工智能·经验分享·学习·程序人生·docker·容器·github
lpfasd1236 小时前
2026年第44周GitHub趋势周报
github