Details
-
Suggestion
-
Resolution: Done
-
P3: Somewhat important
-
None
-
c0c5773345480df8cec8d6959f89ae255eeb7d8a (qt-creator/qt-creator/4.13)
Description
Scenario:
Use the wizard for creating a new C++ class with the option "Add to version control: Git". Then do some extra modifications to the files after that, like adding a GPL header to each file, and actually implementing the class. Finally, the new files are ready to be committed.
Current behaviour:
Running "git diff" shows the differences between the auto-generated content of the new files and the content of the files after the user is done modifying them. Running "git status" shows two different sets of changes to the files (both staged changes and not yet staged changes).
Expected behaviour:
Running "git diff" shows the entire contents of the file as if it was newly added. Running "git status" shows only one set of differences for the files.
Suggested change:
The "new file" wizard should use the option --intent-to-add when adding newly generated files to git. This tells git that the files are supposed to be added, but it does not actually add the content of the files to the index.
Attachments
Issue Links
- is required for
-
QTCREATORBUG-19721 Git user interface improvements
- Reported
- resulted in
-
QTCREATORBUG-25019 Adding new files to Git from within Qt Creator does not work
- Closed