GNOME Bugzilla – Bug 663672
Automatically create and commit a project to git when created
Last modified: 2020-11-07 12:12:57 UTC
It would be nice if that in the project wizard there was an option that asks if you want to control your sources with git. That way you will have a clean first commit with all the needed files and a useful .gitignore file. As a test, I created a project, build it and then looked on Nautilus the files that it created. Since I already build and started the project I couldn't know if a given file or folder would be meant to be controlled by git or not. On the other hand, if just after creating the project Anjuta initializes the folder as git controlled and does a first commit with everything there (and setting up a good .gitignore file), afterwards it will be really simple to know what can be ignored or what is being controlled.
I would like to minimize the number of questions ask in the project wizard. I think it's not the best place to ask questions because you need to answer them to continue. I can imagine that a real beginner doesn't know what is a version control software and doesn't know what is git, subversion of CVS. Ideally, I would like to ask in project wizard only the name of the project, the name of the user and a place where the project is created. Currently there are more questions because those things are much easier to handle in the project wizard. So we can add this here too, but I think it's a work around. I'm completely agree that there is problem here. The project wizard creates various files that the user doesn't really know, so it will be difficult for him to know which one should be committed. I think one solution would be to create a special file in the project directory listing all the source files. Then when doing a commit, each version control plugin should read this file and add all files here by default. There are two advantages. The user will see the all the files those need to be committed. And it can work even after creating the project. By example when adding a new directory with the autotools backend you create an additional file (Makefile.am) that has to be committed too. Another solution would be to that the version control plugin asks the project manager the list of source files so it can check that all of them are committed.
> Another solution would be to that the version control plugin asks the project > manager the list of source files so it can check that all of them are > committed. I think that would be the better solution. But creating a repository seems not really implemented yet in the git plugin.
What if when the Git plugin is enabled, it will ask the user if he wants to initialize the repository? It can have a list of types of files commonly added to revision control, like *.c, *.h, Makefile.am, configure.ac, README, etc., so they will be automatically added to index when initializing the repository, then the user could tweak it then commit his first commit.
bugzilla.gnome.org is being replaced by gitlab.gnome.org. We are closing all old feature requests in Bugzilla which have not seen updates for many years. If you are still requesting this feature in a currently supported version of GNOME (currently that would be 3.38), then please feel free to report it at https://gitlab.gnome.org/GNOME/anjuta/-/issues/ Thank you for reporting this issue and we are sorry it could not be implemented.