You are not logged in.

#1 2013-10-29 21:02:33

zrl
Member
From: Los Angeles
Registered: 2013-10-29
Posts: 6
Website

gitignorer - easily create .gitignore files for your projects

Gitignorer is a simple utility that aids in the creation of .gitignore files. It pulls .gitignore templates from github.com/github/gitignore, mashes them together, and saves them to a .gitignore in the current directory.

Example usage:

gitignorer create c java python

Gitignorer is currently available in the AUR over at https://aur.archlinux.org/packages/gitignorer/ and on GitHub at https://github.com/zachlatta/gitignorer

Offline

#2 2013-10-29 21:11:28

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: gitignorer - easily create .gitignore files for your projects

Interesting idea to avoid unnecessary boiler plate. I wasn't able to test it due to a transient HTTP error, but I have a suggestion: install the templates in a central directory inside the package instead of expecting the user to rely on remote access. You could even create a separate "gitignorer-templates" package if you expect to update the templates often. That approach would also make it easy to use per-user directories for custom user templates. I recommend using standard XDG paths in that case (e.g. look for templates in $XDG_DATA_HOME and the system directory).

Nice first post btw. wink
Welcome to the forum!


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#3 2013-10-29 21:12:01

aspidites
Member
Registered: 2011-03-11
Posts: 30

Re: gitignorer - easily create .gitignore files for your projects

If you change the name to git-ignore and install in usr/bin/git-ignore, it integrates nicely into vim:

git ignore create c java python

Whats the possibility of  changing the interface such that 'create' isn't neaded? In otherwords:

git ignore c java python
git ignore --show

Last edited by aspidites (2013-10-29 21:12:20)


coder formally known as EnvoyRising

Offline

#4 2013-10-29 21:22:41

zrl
Member
From: Los Angeles
Registered: 2013-10-29
Posts: 6
Website

Re: gitignorer - easily create .gitignore files for your projects

Xyne: I appreciate the feedback! I initially decided to use GitHub's gitignore repository because it's updated often and I don't need to maintain it. I have been meaning to implement a way to cache templates though. I'll need to think about how I want to go about periodically syncing the templates between gitignorer and GitHub's repository.

aspidites: I'm relatively new to vim. I assume that the user can call all binaries in /usr/bin/ from it? Are there any specific advantages that renaming it to git-ignore would have over writing a vim plugin for it, besides needing to install a vim plugin? I do think changing the interface to something similar to your example is a good idea though. Fortunately, it's rather trivial to implement. I'll change it to something like that the next chance I have.

Offline

#5 2013-10-29 21:23:29

zrl
Member
From: Los Angeles
Registered: 2013-10-29
Posts: 6
Website

Re: gitignorer - easily create .gitignore files for your projects

Also, Xyne, what was the error you ran into?

Offline

#6 2013-10-29 21:43:05

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: gitignorer - easily create .gitignore files for your projects

zrl wrote:

Xyne: I appreciate the feedback! I initially decided to use GitHub's gitignore repository because it's updated often and I don't need to maintain it. I have been meaning to implement a way to cache templates though. I'll need to think about how I want to go about periodically syncing the templates between gitignorer and GitHub's repository.

I hadn't realized that the templates were provided by GitHub. In that case I retract my previous suggestion.

zrl wrote:

Also, Xyne, what was the error you ran into?

It was just a transient HTTP error from the GitHub server, completely independent of the package. It seems to be resolved now.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#7 2013-10-29 21:55:40

aspidites
Member
Registered: 2011-03-11
Posts: 30

Re: gitignorer - easily create .gitignore files for your projects

Typo, sorry. I meant git not vim. By naming it git-ignore it automatically becomes a git subcommand. Nothing at all to do with vim smile


coder formally known as EnvoyRising

Offline

#8 2013-10-29 23:02:44

zrl
Member
From: Los Angeles
Registered: 2013-10-29
Posts: 6
Website

Re: gitignorer - easily create .gitignore files for your projects

aspidites: That's really interesting. I think I'm going to iron out a few issues in the current version and plan to rename it to git-ignore with the new interface for V2.

Offline

#9 2013-10-29 23:18:28

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: gitignorer - easily create .gitignore files for your projects

Renaming it "git-ignore" may set it on a collision course with other applications. Choose the name very carefully if you do. "ignore" is a bit too general for what this does, imo.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#10 2013-10-29 23:27:20

zrl
Member
From: Los Angeles
Registered: 2013-10-29
Posts: 6
Website

Re: gitignorer - easily create .gitignore files for your projects

That is a very good point. And better name suggestions?

Offline

#11 2013-10-29 23:32:28

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: gitignorer - easily create .gitignore files for your projects

zrl wrote:

That is a very good point. And better name suggestions?

I was thinking about it while writing my previous post, but I couldn't come up with anything that was both clear and unique.

Maybe "git-ghit", where "ghit" stands for "GitHub Ignore Templates". I honestly can't even tell right now if that is a decent or a horrible suggestion. tongue


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#12 2013-10-29 23:41:49

zrl
Member
From: Los Angeles
Registered: 2013-10-29
Posts: 6
Website

Re: gitignorer - easily create .gitignore files for your projects

That's definitely one possibility.

Another option may be to expand the program from simply gitignore creation to gitignore management. It could handle adding, removing, and tweaking sections of a gitignore. Maybe opinionated gitignore management? I am truly terrible with names.

Offline

#13 2013-10-30 11:27:51

aspidites
Member
Registered: 2011-03-11
Posts: 30

Re: gitignorer - easily create .gitignore files for your projects

Considering there isn't an official git-ignore and no packages are named such, I'm not sure of which collision course you speak. The argument seems kind of like "don't take the obvious name because someone else will later". Anyway, if the scope of the project is changing, then a my suggested name probably isn't best anyway.

I'm not much better with names. Only thing I came up with was ighub: IGnore gitHUB. If the program was generalize to get other git-related things (like hooks maybe), i'd suggest 'git-smore' -> git some more


coder formally known as EnvoyRising

Offline

#14 2013-10-30 20:34:19

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: gitignorer - easily create .gitignore files for your projects

aspidites wrote:

Considering there isn't an official git-ignore and no packages are named such, I'm not sure of which collision course you speak. The argument seems kind of like "don't take the obvious name because someone else will later".

The argument is more "don't take a very generic name and use it for something very specific, especially when you will invade a common namespace which is likely to be expanded later".


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#15 2013-10-30 21:05:00

aspidites
Member
Registered: 2011-03-11
Posts: 30

Re: gitignorer - easily create .gitignore files for your projects

Ah. That makes more sense. Except for the "likely be expanded later part". How long has git  been out and they STILL haven't implemented git-ignore? In fact, the git-subtree command isn't officially part of git. I would say that if the template location could be customized, that this would be generic enough to warrant "invading" that space.


coder formally known as EnvoyRising

Offline

#16 2013-10-30 21:41:43

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: gitignorer - easily create .gitignore files for your projects

Fair enough. I would still be hesitant to do so, but it's not my decision and I am unlikely to be affected either way.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#17 2013-10-31 10:28:30

aspidites
Member
Registered: 2011-03-11
Posts: 30

Re: gitignorer - easily create .gitignore files for your projects

All that said, a unique name might make the project stand out, so from that aspect, I think you'er right, Xyne.


coder formally known as EnvoyRising

Offline

#18 2013-10-31 10:43:06

Jristz
Member
From: America/Santiago
Registered: 2011-06-11
Posts: 1,022

Re: gitignorer - easily create .gitignore files for your projects

git-ignorador <- what about this (ignorador [spanish] = [who now] ignore)

or git-gitignorador .... that is a bit long but I not se why this one can't be a valid option


Well, I suppose that this is somekind of signature, no?

Offline

Board footer

Powered by FluxBB