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

推荐订阅源

GbyAI
GbyAI
J
Java Code Geeks
雷峰网
雷峰网
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
V
Vulnerabilities – Threatpost
S
Securelist
The Hacker News
The Hacker News
The Register - Security
The Register - Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
G
Google Developers Blog
Hugging Face - Blog
Hugging Face - Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
M
MIT News - Artificial intelligence
AI
AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The GitHub Blog
The GitHub Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Schneier on Security
Schneier on Security
N
Netflix TechBlog - Medium
T
The Blog of Author Tim Ferriss
Google DeepMind News
Google DeepMind News
Hacker News - Newest:
Hacker News - Newest: "LLM"
H
Hacker News: Front Page
博客园 - 司徒正美
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
B
Blog
Microsoft Azure Blog
Microsoft Azure Blog
大猫的无限游戏
大猫的无限游戏
Security Latest
Security Latest
Engineering at Meta
Engineering at Meta
N
News and Events Feed by Topic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Threat Research - Cisco Blogs
U
Unit 42
V
V2EX
V2EX - 技术
V2EX - 技术
L
LINUX DO - 最新话题
aimingoo的专栏
aimingoo的专栏
Microsoft Security Blog
Microsoft Security Blog
Recorded Future
Recorded Future
P
Privacy & Cybersecurity Law Blog
美团技术团队
小众软件
小众软件
F
Fortinet All Blogs

思有云 - 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文件教程

 •