![]() To use the inline diff view instead, select the Switch to Text Diff Editor (1) option from the toolbar. With Git and Subversion, the diff is displayed side-by-side in a diff editor by default. If the file is accessible, you can double-click on a selected diff chunk and Qt Creator opens an editor displaying the file, scrolled to the line in question. In Qt Creator, a diff is displayed in a read-only editor. Viewing Diff OutputĪll version control systems provide menu options to diff the current file or project: to compare it with the latest version stored in the repository and to display the differences. Instead, all modified files must be staged for a commit. With Git, there is no concept of adding files. ![]() Alternatively, you can add files later by using the version control tool menus. This happens when the parent directory or the project is already under version control and the system supports the concept of adding files, for example, Perforce and Subversion. When you create a new file or a new project, the wizard displays a page asking whether the files should be added to a version control system. Select Window > Output Panes > Version Control to open the pane. The Version Control output pane displays the commands that are executed, a timestamp, and the relevant output. The Tools menu contains a submenu for each supported version control system. Follow the instructions of the wizard to import the project. To import a project that is under version control, choose File > New File or Project > Project from Version Control and select the version control system that you use. You can also select Tools and then select Create Repository in the submenu for the version control system. When creating a new project by selecting File > New File or Project, you can choose a version control system on the final wizard page. Qt Creator allows you to create repositories for version control systems that support local repository creation, such as Git, Mercurial, or Bazaar. The Revert command uses the patch utility to revert partial changes.Ĭreating VCS Repositories for New Projects Patch command specifies the path to the patch utility that is used to apply changes in the format used to represent the diff output.For example, ssh-askpass or x11-ssh-askpass, depending on the ssh-askpass implementation that you use. SSH prompt command specifies an ssh-askpass command that you can use (on Linux) to prompt the user for a password when using SSH.If you also specified a User/alias configuration file, you can select authors in the Nicknames dialog. User fields configuration file is a simple text file consisting of lines specifying submit message fields that take authors as values, for example: Acked -by:Īfter you specify a file in this field, you can add authors as values of the submit message fields when submitting changes.For example: Jon Doe jdoe Īfter you specify a file in this field, you can select authors as values of the submit message fields in the Nicknames dialog. For each author, you must specify a real name and email address and optionally an alias and a second email address. User/alias configuration file is a text file that lists author names in mailmap format.If there is an error, the script should output a message on standard error and return a non-zero exit code. The submit message is passed in as the script's first parameter. Submit message check script is a script or program that can be used to perform checks on the submit message before submitting.Select Tools > Options > Version Control > General to specify settings for submit messages: HOME is set to %HOMEDRIVE%%HOMEPATH% when the Git executable is run and authorization works as it would with git bash. Select the Environment Variables and the Set "HOME" environment variable check boxes. Select Tools > Options > Version Control > Git. You can set the HOME environment variable from Qt Creator. When you run Git from a Windows command prompt, it looks for the SSH keys in its installation directory, and therefore, the authorization fails. However, the variable is typically not set in a Windows command prompt. If you configure Git for use with git bash, only, and use SSH authorization, Git looks for the SSH keys in the directory where the HOME environment points to. If no issues arise, you should be ready to use the system also from Qt Creator. To allow access, make sure that the command line clients can be located using the PATH environment variable or specify the path to the command line client executables in Tools > Options > Version Control.Īfter you set up the version control system, use the command line to check that everything works (for example, use the status command). ![]() Qt Creator uses the version control system's command line clients to access your repositories.
0 Comments
Leave a Reply. |