QT Project on github
-
Hello, I'm new to QT and stuff like git and github and I'm a bit confused how to make qt projects work from github.. I have a QT project and I would like to upload it to github and if its possible directly edit it from my pc or laptop. Cuz before I needed to move the project from my pc to my laptop back and forth when I didnt have access to one and then it wouldnt want to detect my project. So I just want to ask for some directions how to upload my qt project to github and access it from multiple devices.
-
@Grand_Titan This doesn't seem to really be a Qt question at all. Just look up a git tutorial and make a GitHub account and start using it. When you make changes on one machine, you upload them to the repository on GitHub. Then you pull them down on the other machine and carry on working. Same as any programming project where you are using Git. Your question is firmly in "Let me google that for you" territory, honestly.
Qt Creator does have built in git features, but you don't need to use them specifically. It's ultimately the exact same functionality of commit/push/pull as any other git client.
-
Hi,
Basically:
- Create a project on GitHub
- Accept the proposition to generate a
.gitignore
file for C++ application. - Clone the project in your main machine
- Add your project content there (ensure it's clean !)
- If not already there, add
qmake.pro.user
andCMakeLists.txt.user
to the.gitignore
file as they are generated by Qt Creator and are specific to your machine.
Then use
git add
to add your project files to the git repo, git commit with a nice message (use conventional commit for your messages, it's a really good habit). And thengit push
to send that back to GitHub.Then the usual git flow applies when working on multiple machines.
-
@SGaist Thanks how about using the projects on another machine, I had problems before when I had my project on my usb because the QT Creator did not want to "acknowledge" my project, I dont remember what it said bit it just would load the project as a project so I couldnt compile or anything just open the files in the editor.
-
You clone it on your other machine and continue your work there. Commit your work regularly and push back to GitHub. When switching machine pull your code changes. I recommend working with topic branches to scope your work.
-