Saving the program in the version control

The instructions of this section are related to the submission policy of the course. If you already saved your program in version control by using command line, as explained in 1.7.1 Submission policy of the course, you can skip this section.

The section concerning the first assignment to be submitted (1.7.1) explains step by step how to submit assignments for evaluation. This section considers the fourth phase more precisely, in the case that you are using Git from Qt Creator.

After you have created and tested your program, you need to save it into the version control in order to submit it for evaluation.

  1. First, check the situation of your files in version control. You can do this in Qt Creator by choosing Tools > Git > Local Repository > Status. Qt Creator will open the window ”Version Control”, in which you will see a list of the changes you have made to your working copy. Make sure that the new files you have created while doing this assignment are on the list ”Untracked files:”.

    Screenshot on changes done
  2. Move the changes you have made into the repository by choosing the action Tools > Git > Local Repository > Commit....

    Fill in your personal information in the window that Git opens. These settings determine who is marked by Git as the creator of the version when a new version is added into the local repository.

    Screenshot on filling personal information

    On the list, mark the files you want to add into the local repository: Click only on the files that are relevant to your commit. The first submission should contain the files first_submission/main.cpp and first_submission/first_submission.pro.

    Now, in the Description window, write a commit message which, in your opinion, describes the content of your commit as clearly and concisely as possible. At the end click the Commit button.

  3. Take the changes from the local data repository into the central repository in Qt Creator by choosing Tools > Git > Remote Repository > Push.

    Now you have added the changes of your working copy first into your local data repository (commit) and then into your central data repository (push). You can also view the changes in your central data repository on your browser via the gitlab web address in case you want to see that the changes really were completed. You are also able to view the status of your project in the version control via Qt Creator (Tools > Git > Local Repository > Status).