gitignore和hgignore的相互转换? [英] Interconversion of gitignore and hgignore?

查看:182
本文介绍了gitignore和hgignore的相互转换?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用hg-git将一些软件存储库推送到github,并且我意识到,如果人们使用git检出它们,他们将需要在存储库中使用.gitignore文件.有没有自动的方法可以将hgignore转换为gitignore,反之亦然?

I'm just starting to use hg-git to push some mercurial repositories to github, and I'm realizing that if people check them out using git, they'll need a .gitignore file in the repository. Is there any automated way to convert hgignore to gitignore or vice versa?

推荐答案

如果您只是在hgignore中使用glob语法,那么您只需要做的就是重命名它,它应该可以正常工作.如果您使用的是regex语法,那将是另一回事...

If you're just using glob syntax in your hgignore, then all you'd need to do is rename it, and it should just work. If you're using regex syntax then it's going to be a different story...

这篇关于gitignore和hgignore的相互转换?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆