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

推荐订阅源

Engineering at Meta
Engineering at Meta
博客园_首页
H
Help Net Security
WordPress大学
WordPress大学
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
B
Blog
I
InfoQ
SecWiki News
SecWiki News
T
Tailwind CSS Blog
Spread Privacy
Spread Privacy
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
Vulnerabilities – Threatpost
N
Netflix TechBlog - Medium
P
Palo Alto Networks Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Vercel News
Vercel News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
K
Kaspersky official blog
M
MIT News - Artificial intelligence
S
Schneier on Security
T
Threat Research - Cisco Blogs
F
Fortinet All Blogs
Cyberwarzone
Cyberwarzone
Scott Helme
Scott Helme
aimingoo的专栏
aimingoo的专栏
Martin Fowler
Martin Fowler
MyScale Blog
MyScale Blog
The Cloudflare Blog
Recent Announcements
Recent Announcements
Security Latest
Security Latest
G
GRAHAM CLULEY
IT之家
IT之家
Y
Y Combinator Blog
The Last Watchdog
The Last Watchdog
腾讯CDC
Google DeepMind News
Google DeepMind News
V
V2EX
S
Securelist
TaoSecurity Blog
TaoSecurity Blog
B
Blog RSS Feed
S
SegmentFault 最新的问题
博客园 - 叶小钗
P
Proofpoint News Feed
云风的 BLOG
云风的 BLOG
Project Zero
Project Zero
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
F
Full Disclosure

思有云 - IOIOX - GitHub

关于 ghproxy.com 封禁相关仓库的说明 - 思有云 Github Action 部署 acme.sh 全自动批量签发多域名证书教程 - 思有云 分享优质工具 - gh-proxy 代理下载或 git clone Github 仓库 - 思有云 新手入门 Github Webhooks 完美自动化部署教程 - 思有云 GitHub Actions + 腾讯云COS + SCF云函数 + 自动刷新CDN 完美自动化部署静态网站 - 思有云 修改Hosts临时解决GitHub的raw.githubusercontent.com无法链接的问题 - 思有云 - IOIOX
macOS使用Github上传项目时忽略及删除.DS_Store文件教程 - 思有云 - IOIOX
博主: Stille · 2019-04-11 · via 思有云 - IOIOX - GitHub
  • 发布时间:
  • 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文件教程

 •