gitignore跨所有分支? [英] gitignore across all branches?

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

问题描述

嘿,我试图进入git,因为emacs用户要做的第一件事是确保git忽略〜和#*#文件.文档讨论了我一直在使用的.gitignore.但是仍然有几个问题:

Hey I'm trying to get into git, as an emacs user first thing to do is to make sure the ~ and #*# files are ignored by git. Documentation talks about .gitignore which I've been using. However couple of questions remain:

  • gitignore现在已签入,并且已部分签入 的分支. .gitignore应该是 签入,如果是的话,我该怎么办 在所有分支机构均可轻松使用 在我的存储库中?
  • 有没有办法 将gitignore与git config一起使用 gitignore对我所有的人保持不变 回购?
  • 我该如何处理emacs锁 文件以#*#视为注释?
  • gitignore is now checked in and part of a branch. Should .gitignore be checked in and if so, how can i make it easy available across all branches in my repository?
  • is there a way to use the gitignore with git config so gitignore stays constant over all my repos?
  • How can I deal with emacs lock files as #*# is treated as a comment?

我在使用Mac ox雪豹. 问候, 耶隆(Jeroen)

I'm on mac ox snow leopard. regards, Jeroen

推荐答案

将此添加到您的$HOME/.gitconfig;

[core]
    excludesfile = /path/to/your/local/.gitignore

然后它将在您所有的git存储库中本地可用.

Then it'll be locally available on all your git repositories.

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

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