I want to give a logo to an open-source Github project. I can use git, but I don't know the etiquette of pushing stuff. Especially if it's not code. Also, what licenses are possible? Where can I give myself credit?
Perhaps obviously (although perhaps not so obviously in the era of Wikipedia and having one's StackExchange Q&A edited by others without asking)...someone's GitHub repository on the web is not something you modify directly. Instead you "fork" it to create your own clone, that only you (and collaborators you designate) can modify.
So if the project is
github.com/JohnDoe/coolproject you would tell GitHub you wanted to establish
github.com/Noah/coolproject. This establishes a "git clone" of all the files and project history, and the relationship to the original is preserved.
The working model is that you then make another clone on your local machine, of
github.com/Noah/coolproject. This way you can modify files in the project directly (even if you own a repository, GitHub doesn't give you a shell account and password to log into their machines and edit your files). After you've made the changes to add the logo and update any files that use it, you would then wrap up the related changes into a single "commit" representing the differences.
Once you've got your local commit, you would then "push" that commit to your GitHub-hosted clone of the project at
github.com/Noah/coolproject. Because you created that fork, you have the necessary privileges to do this. Then you submit what is called a "pull request" to
github.com/JohnDoe/coolproject. They'll receive a notification that a commit is available, and can choose to integrate it...request feedback or improvements...or just reject it.
You shouldn't have to worry too much about the etiquette if your intentions are good. The most you can do is irritate someone if you send them a request that is poorly formed or somehow doesn't obey the conventions of the project. Their copy of the code won't change without their specific approval.
HOWEVER if all you're doing is submitting an image and not a code patch, the easier thing is to submit the file as an attachment on a GitHub issue. This is a ticket tracking system that's integrated with GitHub, and most (but not all) projects have it enabled. You will find it for instance at
github.com/JohnDoe/coolproject/issues. The developer can take care of putting it in the right places if they accept it, so the real question is more about the discussion of if they want to use it...and what modifications they might need.
Standard practice when donating logo designs to open source is to designate the logo to be maintained under the existing copyright terms of the brand/naming. Whoever controls the name thus controls the mark; this prevents a divergence where the project administrators are giving someone permission to use the name but then the logo designer from years ago comes back and says "but I don't like them, you can't use my logo!"
Especially in large projects, the name and the website is all the central open-source organization retains. You can take all the code to Firefox and change one line of code to make NoahBrowser, but you can't call it Firefox (and likely not even NoahFirefox). A designer working with open source should be ready to give up the design in good faith to the organization stewarding the project...and if you don't have that faith, you probably shouldn't be doing free work for them in the first place.
There may be some people pioneering the idea that an open source project's logo would be licensed through Creative Commons. But notice that even Creative Commons themselves do not do this, and you'd think if anyone would it would be them...so there's probably a good reason for keeping this particular identity aspect of a project under control of traditional "all rights reserved".
Nothing wrong with asking them if they wouldn't mind mentioning it on the developer's official blog if they choose to use it. Or you can write about it on your own blog, for those curious where the logo came from.
Open source is often kind of anonymous, and most of the "who did what" is captured in the version history logs of the source code. You don't see the developers' name in a lot of software, usually that's left for an Easter Egg somewhere. The graphics are a similar deal.
(If you had to see a list of all the developers who contributed to Linux before it would boot up, you'd be watching that scroll by for a very long time...and the list of names would become a significantly large file in every distribution.)
If you are submitting assets and icons... pictures for a button or something that is more reasonably "part of the code" than "part of the project identity"...then those contributions are typically done under the same license as the code itself. If attribution is required, that is generally done to the project; not to the contributors.
For a personal attribution requirements of graphics assets to be used in the program itself, if you want to enforce that you should probably make them as your own project and pick your own license. Then you might suggest the project can use the work under that license. Nothing wrong with that; things like Silk Icons work that way. In my opinion it does put a bit of pressure on you to define the work as generalized, and something multiple projects might use.
I've done two OSS logo design interventions, and have written a bit about it here