未加星标

Global Git Ignores Make Collaborative Development Easier

字体大小 | |
[系统(linux) 所属分类 系统(linux) | 发布者 店小二04 | 时间 2017 | 作者 红领巾 ] 0人收藏点击收藏

Lots of developers are using git, especially when working on projects together. However there is not one single developer tool that every one uses, so there is potential for a lot of unwanted files to end up in your project.

Rather than pollute the .gitignore file for the project with every development tool under the sun, its much more effective to add development tool specific files to your own global ignore file ~/.gitignore_global .

Creating my own global ignores In the ~/.gitconfig of my home directory I have a section called [core] where a global excludes file is defined [core] excludesfile = /Users/jstevenson/.gitignore_global</span>

By adding file name patters to the .gitignore_global file for Emacs, I can add my own personal excludes without adding unnecessary stuff to each project I work on. It also means its one less thing to remember when I am working with git projects.

In the root of your home directory, simple create or update the file .gitignore_global with all the file names and patterns that relate to the tools you use.

Ignore patterns

To help you out, here are some ignore patterns for some of the most common developer tools. There are lots of ignore patterns on the Git Ignore github repository

Emacs ignore patterns
Global Git Ignores Make Collaborative Development Easier

I use Emacs for much of my development projects, so here are some ignore patters I add to my .gitignore_global file

*~ \#* \# /.emacs.desktop /.emacs.desktop.lock .elc auto-save-list tramp .\#* Org-mode

I also create a lot of developer content using Emacs Org-mode, so here are the ignore patterns I add for this.

.org-id-locations *_archive Vi / Vim .*.s[a-w][a-z] IntelliJ ignore patterns *.iml *.ipr *.iws .idea/ Netbeans ignore patters
Global Git Ignores Make Collaborative Development Easier
nbproject/private/ build/ nbbuild/ dist/ nbdist/ nbactions.xml nb-configuration.xml ## Eclipse ignore patters {% img img-thumbnail http://1.bp.blogspot.com/-RmrjIrvG7dE/URUVuk2P5QI/AAAAAAAAJCQ/RGcprIpBxjc/s1600/Eclipse_Icon_by_flosweb.png %} ``` .gitignore_global *.pydevproject .project .metadata bin/** tmp/** tmp/**/* *.tmp *.bak *.swp *~.nib local.properties .classpath .settings/ .loadpath .externalToolBuilders/ *.launch .cproject .buildp

Thank you.

@jr0cket

This work is licensed under a Creative Commons Attribution 4.0 ShareAlike License , including custom images & stylesheets. Permissions beyond the scope of this license may be available at @jr0cket


Global Git Ignores Make Collaborative Development Easier

本文系统(linux)相关术语:linux系统 鸟哥的linux私房菜 linux命令大全 linux操作系统

主题: GitUV
分页:12
转载请注明
本文标题:Global Git Ignores Make Collaborative Development Easier
本站链接:http://www.codesec.net/view/520220.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 系统(linux) | 评论(0) | 阅读(31)