Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide default .gitignore #26

Open
MithicSpirit opened this issue Jan 23, 2023 · 2 comments
Open

Provide default .gitignore #26

MithicSpirit opened this issue Jan 23, 2023 · 2 comments

Comments

@MithicSpirit
Copy link

MithicSpirit commented Jan 23, 2023

There should be a default .gitignore provided (if there isn't one already in the directory? we probably don't want to clobber an already-existing .gitignore, but maybe append to an existing one). I usually go with

/*

!/.gitignore
!/PKGBUILD
!/.SRCINFO

which ignores everything in the root project project directory other than what is necessary; the user can manually exclude more files if they wish to keep some file from the sources in the AUR itself (maybe say that in a comment?).

@alerque
Copy link
Contributor

alerque commented Jan 23, 2023

If you are using aurpublish you can just add a couple gitignore patterns to your overall AUR publish repository that covers all subprojects without cluttering up the subtree repos that get pushed to AUR with your personal workflow tooling.

@eli-schwartz
Copy link
Owner

Yup, I believe the correct way to handle this is to have a global .gitignore for this. I'm not positive what the correct way to handle recommending this to people should be, but I could be persuaded that running setup should create a .gitignore in the overall repository if one doesn't exist, or at least suggest one for you to copy/paste.

Aside: my recommendation would tend to be, you should specify the things to ignore, not the things to not ignore, because you'll want to be able to commit arbitrary named files (including .patch/.diff but also .conf, .desktop, and various other things). What you want to ignore:

  • *.tar* files, .*tgz, *.zip
  • *.asc, *.sig
  • *.log (created by makepkg -L)
  • */src/, */pkg/ (created by makepkg if you haven't overridden BUILDDIR)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants