[SOLVED] How to properly upload source code to GitHub/ transfer code between computers?
-
wrote on 4 Dec 2014, 07:18 last edited by
Hello,
How can I upload my source code to GitHub in a way where developers can easily download it and run it through their Qt creators? Is there a special way to do it for Qt?
Thanks!
-
It works the same way for any kind of files and repositories. No Qt-specific stuff is required. Just create an account on GitHub, add your SSH key, create a repo on github, and push your local repository to it - GitHub will give you all the necessary instructions.
-
Just remember never to include any .pro.user files, build Makefiles, or build objects to the repository - it should be clean, just the source code.
-
wrote on 4 Dec 2014, 17:49 last edited by
Why should I not include the .pro file? Isn't that necessary to compile the program?
-
wrote on 4 Dec 2014, 17:57 last edited by
sierdzio was saying about .pro.user files. These files are generated by qtcreator for each .pro file and keep the user specific setting for the project .
-
wrote on 4 Dec 2014, 22:30 last edited by
ok the .pro.user file is different than the .pro file that i occasionally need to modify? the .pro file should be uploaded but the .pro.user should not?
out of curiosity, where are the .pro.user files located?
Sorry for the dumb questions, I'm new to using GitHub and uploading a Qt project :/
Thanks for all your help!
-
wrote on 4 Dec 2014, 22:45 last edited by
.pro file contains info about your project.
.pro.user contains settings for your project on a particular computer.The settings includes Qt versions, directory locations, etc.
.pro.user file is modified by qtcreator when you modify settings in the "Projects" tab.
.pro.user is located in the same directory as .pro
[EDIT]: You need to submit .pro file.
-
The pro.user file is located in the same folder as the pro file. It's generated by Qt Creator. The most simple way to avoid committing/pushing unwanted files is to add a .gitignore file (the dot is mandatory) with
@
*.pro.user
@inside so you won't have to worry about that file.
IIRC, GitHub offers to generate that file for you so it will included sensible defaults.
-
wrote on 4 Dec 2014, 23:01 last edited by
Thank you for the help!
1/9