What is the importance of `.gitignore` in AUR packages

say i want to keep a copy of all my pkgbuilds in github repo after publishing it in the aur then having a .gitignore file is important or not.

#Ignore everything
*

#But not these files...
!.gitignore
!PKGBUILD
!.SRCINFO

EOS doesn’t have .gitignores in there builds:

but some do so i am a little confused:

A .gitignore file describes a list files you don’t want to add to your repo.

For example, in the repos that I develop out of, I don’t want to upload temp files, editor autosaves or build files so I exclude those.

The AUR is a git repo already so you don’t really have to do that.

1 Like

Yes you are right. I think that serves no purpose as i can always git clone the ssh link. I think eos does that so that others can collaborate and contribute. Can’t speak for yochanan though.

@dalto What does this mean?

If you already have a package, initialize it as a Git repository if it is not one, and add an AUR remote:

$ git remote add label ssh://aur@aur.archlinux.org/pkgbase.git

Then fetch this remote to initialize it in the AUR.

If I want to make changes to a existing package on the aur. can i just git clone the ssh link, git add, commit and push?

This is for new packages

Yes. As long as you are one of the maintainers.

Also, don’t forget to update the .SRCINFO if that is needed.

1 Like

Thanks :slight_smile: Just one last. What is a label?

already noted

Be sure to regenerate .SRCINFO whenever PKGBUILD metadata changes, such as pkgver() updates; otherwise the AUR will not show updated version numbers.

The name you want to call it.

Call what? Because pkgbase would be replaced by the package name. So which name :slight_smile:?

It is the name you want to call the remote.

1 Like

I can tell you this one will haunt you at some point :wink: :

make an alias or script or something.
Otherwise you will definitely forget it at some point :slight_smile:

updpkgsums && makepkg --printsrcinfo > .SRCINFO

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.