git - 为什么存在未跟踪文件时 git describe 不给我脏后缀?
问题描述
git status
给我看一些未跟踪的文件。但git describe
没有给我脏旗。为什么?
user@host:~$ git status
On branch master
Your branch is ahead of 'origin/master' by 16 commits.
(use "git push" to publish your local commits)
Untracked files:
(use "git add <file>..." to include in what will be committed)
nothing added to commit but untracked files present (use "git add" to track)
user@host:~$ git describe --dirty --tags
v0.3-4-3-geadf778
解决方案
--dirty
查找跟踪文件上未提交的修改;未跟踪的文件被完全忽略。
如果你想让 git “感知”额外的文件,你可以使用git add file1 file2 ...
或git add --intent-to-add file1 file2 ...
推荐阅读
- python - 在dash应用程序中,href可以实现到dcc.Dropdown中的值吗?
- python - 变量不随条目更新
- cookies - httpOnly cookie 不被存储或不发送到服务器
- react-native - 按下 onExitViro 按钮时 Viro 应用程序崩溃
- javascript - 如何在javascript es6类中使用全局对象窗口或文档
- javascript - 在 DataGrid Toolbar 的弹出组件 Material-UI 中添加自定义样式
- python - Traceback(最近一次调用最后一次):文件“D:\Python\PLAY.PY”,第 29 行,在
- python - 如何查看 MultiStep 张量流模型的预测值?
- ruby-on-rails - Facebook Oauth URL 被阻止
- mysql - 为什么有两种方式可以更新`Binary log`。(1. Master Binlog dump 2. Master Database)