jokerai's recent timeline updates
jokerai

jokerai

V2EX member #499745, joined on 2020-07-19 00:12:14 +08:00
jokerai's recent replies
Jan 24, 2022
Replied to a topic by Oisin 奇思妙想 能从新西兰弄点啥到国内去卖?
新西兰赚钱 CHN 炒股炒基金是吧
Aug 27, 2021
Replied to a topic by left7341 分享发现 真的很喜欢这种复古风格的日记软件
好神奇
@x86 #39 what a candidate
派分身去,自己不去
DOM 解析生命周期
异步脚本、延迟脚本与 DOMContentLoaded 的关系
https://www.cnblogs.com/Bonnie3449/p/8419609.html
上面少了一步, 应该是

touch .gitignore
nano .gitignore 写入 2.txt
git add .gitignore
git commit -m 'update gitignore'
“不需要 git 管理 / 把文件踢出 git 管辖区 / 让 git 无视这个文件的存在吧” 的设置是应该放在 .gitignore 里的
如果误操作了,则先更新 .gitignore 文件并 commit,再对此文件把它移出去、commit 一次、再把它移回来就 OK
参考
https://stackoverflow.com/questions/1274057/how-to-make-git-forget-about-a-file-that-was-tracked-but-is-now-in-gitignore/1274081#1274081

例子
cd testDir1
git init
touch 1.txt 2.txt 3.txt 4.txt 5.txt
git add 1.txt 2.txt
git commit -m 'update'

touch .gitignore
nano .gitignore 写入 2.txt
git commit -m 'update gitignore'

把 2.txt 移到外面目录( git 管辖区文件夹的外面)
git add 2.txt
git commit -m 'update'

把 2.txt 移到目录( git 管辖区文件夹)
git status

此后 2.txt 不会再被 git 管辖
Y3NqMDMwNUBxcS5jb20=
谢谢
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1099 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 16ms · UTC 23:25 · PVG 07:25 · LAX 16:25 · JFK 19:25
♥ Do have faith in what you're doing.