Adding c++ .h and .cpp files to supported file types list

Hi I wish to version c++ header, and source files using GitHub.

I am developing using Qt Creator 4.2.0 - Based on Qt 5.7.1 (GCC 6.3.0 20170415, 64 bit) under linux. Currently MX linux v18.3.

I get the following message see .png image-file above, derived from a screen shot of my unsuccessful attempt to add the files to my try1 branch.

  1. I successfully managed to download all my original c++ files(including .pro) file when I first set up the project.
  2. All the C++ files I use are standard text (.txt) files. Why are plain text files not included in the list of supported files.

I am sure I am missing some blindingly obvious point so am looking froward to a speedy reply before I am forced to go back to the scheme suggested in your ‘Hello World’ repository ie. copying my Qt projects as project01, project02, etc.

Thanking you in anticipation
Jaybee Dror.

That screenshot looks like you are trying to upload the files as a comment to one of your existing commits.

If you want to add your files to a branch you need to add, commit, and push them. The easiest way is to do that locally using the Git command line or IDE of your choice. If you prefer to upload files over the web interface, see this documentation:


I followed the instructions in the GitHub doc you sent me and it worked. I had assumed that the files had to be uploaded in the current branched and then merged. I realise now that files available in the list only refer to files which are for information only - eg a screenshot.

I much appreciate your help.

Thanks JayBee Dror

1 Like