惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LINUX DO - 热门话题
Stack Overflow Blog
Stack Overflow Blog
B
Blog
WordPress大学
WordPress大学
Project Zero
Project Zero
P
Palo Alto Networks Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - 司徒正美
有赞技术团队
有赞技术团队
S
SegmentFault 最新的问题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
小众软件
小众软件
T
Tailwind CSS Blog
Forbes - Security
Forbes - Security
F
Full Disclosure
SecWiki News
SecWiki News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Hacker News: Ask HN
Hacker News: Ask HN
C
Check Point Blog
Microsoft Security Blog
Microsoft Security Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
F
Fortinet All Blogs
Cisco Talos Blog
Cisco Talos Blog
G
Google Developers Blog
J
Java Code Geeks
Google DeepMind News
Google DeepMind News
人人都是产品经理
人人都是产品经理
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recorded Future
Recorded Future
O
OpenAI News
Spread Privacy
Spread Privacy
MongoDB | Blog
MongoDB | Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
C
Cybersecurity and Infrastructure Security Agency CISA
S
Securelist
V
Vulnerabilities – Threatpost
Y
Y Combinator Blog
IT之家
IT之家
U
Unit 42
腾讯CDC
S
Security Affairs
C
Cisco Blogs
Schneier on Security
Schneier on Security
The Last Watchdog
The Last Watchdog
B
Blog RSS Feed
宝玉的分享
宝玉的分享
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Security @ Cisco Blogs
Cyberwarzone
Cyberwarzone
T
The Blog of Author Tim Ferriss

思有云 - IOIOX - macOS

我为什么将个人数据从私有云迁移至 iCloud ? - 思有云 Mac mini M1 2020 简单体验心得 - 思有云 解决 Apple Watch 无法解锁 MacBook 的简单方法 - 思有云 macOS使用oh-my-zsh美化Terminal,iTerm2,VSCode命令行终端配置教程 - 思有云 - IOIOX
macOS使用Github上传项目时忽略及删除.DS_Store文件教程 - 思有云 - IOIOX
博主: Stille · 2019-04-11 · via 思有云 - IOIOX - macOS
  • 发布时间:
  • 9191 次浏览
  • 1 条评论
  • 660字数
  • 分类: 技术教程
  1. 首页
  2. 正文  

前言

最近又在折腾和研究Docker和GitHub,虽然不懂写代码,但靠着搜索引擎慢慢摸索,觉得很有意思,于是在Mac上安装了官方GitHub Desktop.使用过程中发现上传代码或者项目时,会把manOS的系统文件.DS_Store文件上传上去.于是在网上找到了简单解决方法.

本文为 Stille 原创文章.经实践,测试,整理发布.如需转载请联系作者获得授权,并注明转载地址.


解决方案

打开终端
输入以下命令进入你的Github仓库文件夹

macOS下GitHub文件夹默认存放在Documents下,xxxx为你的仓库名称.

cd ~/Documents/GitHub/xxxx

输入以下命令创建.gitignore文件,并忽略.DS_Store文件.

echo .DS_Store >> ./.gitignore

删除GitHub项目文件夹内已经产生的.DS_Store文件

该命令仅删除当前文件夹及子文件夹的.DS_Store文件

find . -name '*.DS_Store' -type f -delete

最后打开GitHub Desktop,提示更改项为删除.DS_Store文件,同步上传即可.


结语

继续折腾GitHub和Docker去,慢慢更新使用中的一些小技巧.请持续关注本站.


晚高峰稳定 4K 的 IPLC 机场 解锁各流媒体 支持 ChatGPT. 晚高峰稳定 4K 的 IPLC 机场 解锁各流媒体 支持 ChatGPT. RedteaGO - 最划算的大陆漫游 eSim 流量卡,原生境外 IP,注册就送 3 刀。
RedteaGO - 最划算的大陆漫游 eSim 流量卡,原生境外 IP,注册就送 3 刀。

赞赏作者

如果喜欢我的文章,觉得对你有帮助,请随意赞赏!

macOS使用Github上传项目时忽略及删除.DS_Store文件教程

 •