有谁知道我如何结合2个onclick事件?
<a href="#" onClick='return resetVideo("vid1;vid3")'>
我想重置视频'1'和'3' - 但似乎无法让它工作! 我必须包含resetVideo命令两次吗?
谢谢!
does anyone know how I can combine 2 onclick events?
<a href="#" onClick='return resetVideo("vid1;vid3")'>
I want to reset both videos'1' and '3' - but can't seem to get it to work! Do I have to include the resetVideo command twice?
Thanks!
“ .gitignore文件不忽略 ”中提到的解决方案有点极端,但应该工作:
# rm all files git rm -r --cached . # add all files as per new .gitignore git add . # now, commit for new .gitignore to apply git commit -m ".gitignore is now working"
(请务必首先提交您想要保留的更改 ,以避免以下 jball037 注释中的任何事件。
--cached
选项将保持您的文件不受您的磁盘影响。)您还在博客文章“ 让Git忽略已经跟踪的文件 ”中还有其他更细粒度的解决方案:
git rm --cached `git ls-files -i --exclude-standard`
Bassim 在编辑中建议:
文件中有空格的路径
如果您收到类似于
fatal: path spec '...' did not match any files
的错误消息fatal: path spec '...' did not match any files
,则可能在其路径中包含空格的文件。您可以使用选项
--ignore-unmatch
删除所有其他文件:git rm --cached --ignore-unmatch `git ls-files -i --exclude-standard`
但不匹配的文件将保留在您的存储库中,并且必须通过用双引号括起路径来显式删除:
git rm --cached "<path.to.remaining.file>"
The solution mentioned in ".gitignore file not ignoring" is a bit extreme, but should work:
# rm all files git rm -r --cached . # add all files as per new .gitignore git add . # now, commit for new .gitignore to apply git commit -m ".gitignore is now working"
(make sure to commit first your changes you want to keep, to avoid any incident as jball037 comments below.
The--cached
option will keep your files untouched on your disk though.)You also have other more fine-grained solution in the blog post "Making Git ignore already-tracked files":
git rm --cached `git ls-files -i --exclude-standard`
Bassim suggests in his edit:
Files with space in their paths
In case you get an error message like
fatal: path spec '...' did not match any files
, there might be files with spaces in their path.You can remove all other files with option
--ignore-unmatch
:git rm --cached --ignore-unmatch `git ls-files -i --exclude-standard`
but unmatched files will remain in your repository and will have to be removed explicitly by enclosing their path with double quotes:
git rm --cached "<path.to.remaining.file>"