Git:如何处理不同的shebang [英] Git: how to deal with different shebang
问题描述
在我看来,这必须是这是一个非常普遍的问题,但我找不到任何提及。
我使用git,但我不会在任何延伸中称自己为专家。
更改为
#! usr / bin / env python
或
#!/ usr / bin / env ruby
然后它应该可以在所有系统上运行,只要你在 PATH
环境变量中有python和ruby。
How do people deal with different shebangs between local and remote?
For example, my local python is /usr/bin/python, whereas my web host is a purpose-built python at ~/local/bin/python. A lead developer may have ruby at /usr/bin/ruby, whereas mine is /usr/local/bin/ruby.
I manually edit the shebang, but then git marks it as a change. Ideally, I would like git to ignore the first line of the file, or perhaps to ignore a regex match of lines within the file.
It seems to me this must be a very common problem, but I cannot find any mention of it.
I use git, but I would not call myself an expert by any stretch.
Change it to
#!/usr/bin/env python
or
#!/usr/bin/env ruby
Then it should work on all your systems, provided you have python and ruby in your PATH
environment variable.
这篇关于Git:如何处理不同的shebang的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!