# What should I upload exactly to GitHub

I have been working on improving/changing an existing package. Now that I am done, I have a package ready for use in my system. What should I consider when uploading it to a repository?

bin folder should probably not be uploaded. But what about msg_gen? is there anything special I should consider? Is there also a tool that makes this process automatic?

edit retag close merge delete

Sort by » oldest newest most voted

afaik these folders only end up 'in-source' when using the rosbuild build system. catkin should do out-of-source builds (as it uses CMake), so the entire source tree should be clean of generated artefacts. As @Dan Lazewatsky wrote: in general only source entities are to be part of a repository, anything generated from those sources should not (with the exception of something that is very hard to regenerate, or is impossible without some specific setup, or ..). Generated sources are also most of the times not committed to a repository. For ROS this would include the headers and Python sources generated by the message generation system (obviously, the actual message definitions themselves do end up in the repository).

For rosbuild systems you could setup a .gitignore excluding the bin, build and other folders that appear in your package's directory after a rosmake. Looking at the setup of other projects can certainly be a good approach.

I have been working on improving/changing an existing package. Now that I am done, I have a package ready for use in my system. What should I consider when uploading it to a repository?

If the existing package was already using a VCS, then perhaps you could consider submitting patches to the original author or maintainer(s). For git(hub) based projects that is especially easy through the use of Pull Requests.

more

I'm not sure there's a definitive list anywhere, but a good place to start is looking at the .gitignore of well-maintained ROS packages (for example, slam_gmapping). A rule of thumb is anything removed with make clean should not be included, but I think that will leave some things around that you don't need in your repo.

more