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】
相关推荐
冬奇Lab10 小时前
一天一个开源项目(第35篇):GitHub Store - 跨平台的 GitHub Releases 应用商店
开源·github·资讯
Jahzo12 小时前
openclaw桌面端体验--ClawX
人工智能·github
逛逛GitHub14 小时前
6个粉丝推荐的 GitHub 项目,收藏一波。
github
MaoPou17 小时前
Hello Haxe篇
github
Bigger20 小时前
为什么你的 Git 提交需要签名?—— Git Commit Signing 完全指南
git·开源·github
慢慢开始吧1 天前
Redmi Note 7 Pro (Violet) 爆改满血 Linux 掌上服务器指南
github
模型时代2 天前
GitHub Codespaces存在RoguePilot漏洞,可致GitHub令牌泄露
github
webkubor2 天前
AI 时代的 robots.txt:深度解析 llms.txt 规范与项目“AI 原生化”改造实战
github
i学长的猫2 天前
obsidian md github站点
github
jack@london2 天前
使用Railway
github