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】
相关推荐
troy1286 小时前
Python 基础语法(九):Django/Flask/FastAPI 三大 Web 框架详细对比解析
python·jupyter·django·flask·github·fastapi
dong_junshuai10 小时前
每天一个开源项目#103 BrowserSkill:4.7K星,Agent接管真实浏览器
开源·github·agent
dong_junshuai10 小时前
每天一个开源项目#102 六阶段代码复核流程范式
开源·github·agent
峰向AI11 小时前
别再给 AI 助手单独付费了,腾讯开源 3.6K 星标的全家共享平台
github
逛逛GitHub12 小时前
我近期看到的最有创意的 GitHub 开源项目,太惊艳了。
github
m4Rk_13 小时前
【论文阅读】Agent 记忆机制(73):MemGAS——让长期对话记忆按问题选择粒度并关联证据
论文阅读·人工智能·学习·开源·github
横木沉15 小时前
IntelliJ IDEA 无法识别 Git:Git is not installed 问题解决
java·git·github·intellij-idea
小麦在野16 小时前
独立 App 开发系列:用 GitHub Pages 托管隐私政策和用户协议
android·github
用户68559861145517 小时前
我做了一套知识结构规格,它最核心的约束是拒绝替你填内容
github
简创AIGC陶先生17 小时前
【直播切片工作台】第14章:种子数据 Seeder
github