【发布时间】:2020-11-17 07:51:41
【问题描述】:
我在 YouTube 上观看一个试图学习 Git 的教程,当我输入“git status”时,我得到了一堆我什至不知道我有的未跟踪文件。它看起来像这样:(
use "git add/rm <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
deleted: HW5-master/.DS_Store
deleted: HW5-master/README.md
deleted: HW5-master/github_fork.png
deleted: HW5-master/solution/vltrees.py
deleted: HW5-master/variably_leafed_trees/instructions.mdown
deleted: HW5-master/variably_leafed_trees/vltrees.py
Untracked files:
(use "git add <file>..." to include in what will be committed)
.CFUserTextEncoding
.DS_Store
.Rapp.history
.Rhistory
.anaconda/
.bash_history
.bash_profile
.bash_profile-anaconda3.bak
.bash_profile.pysave
.bash_sessions/
.conda/
.condarc
.config/
.cups/
.ghc/
.gitconfig
.idlerc/
.ipynb_checkpoints/
.ipython/
.jupyter/
.matplotlib/
.oracle_jre_usage/
.python_history
.rstudio-desktop/
.spyder-py3/
.subversion/
.viminfo
.wing101-7
.wingpersonal6
.wingpersonal7
.zprofile
.zsh_history
Applications/
Creative Cloud Files/
Desktop/
Documents/
Downloads/
Library/
Movies/
Music/
Pictures/
Public/
Untitled.ipynb
VirtualBox VMs/
ccg-latex.zip
ccg-latex/
https:/
jagex_cl_oldschool_LIVE.dat
jagexappletviewer.preferences
jagexcache/
nltk_data/
opt/
random.dat
我认识其中一些目录,但其他一些我从未见过。这是一个问题吗?我应该删除它们吗?如果是这样,怎么做?我不想不小心弄乱我的电脑。还有,在哪里可以找到关于Git的好教程,YouTube上的一切似乎都太肤浅了。
【问题讨论】:
-
看起来你初始化了你的主目录。在您知道它们的用途之前,您不应该删除任何这些文件。
-
或者,您可以将文件添加到 git,然后将其删除并尝试发生什么。这可能是一次很好的学习体验,当你发现为什么需要它时,可以从 git 中恢复文件。
-
但请注意,“良好的学习经历”并不意味着它没有令人难以置信的令人沮丧的潜力。 :)
标签: git command-line terminal