添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
严肃的吐司  ·  華梵大學·  5 月前    · 
不爱学习的高山  ·  PyQT 起步走 :: ...·  1 年前    · 
不拘小节的鸵鸟  ·  GHNU-92 Sentai ...·  1 年前    · 

GIT integration in Studio requires the Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017, 2019, and 2022. Check the Software Requirements page.

Authentication methods in Studio differ in accordance with the methods used for cloning a GIT repository, either HTTPS or SSH. Check this page to see which you should use if you're working with GitHub.

Note:
  • The GIT credentials you provide in Studio are stored in the Windows Credential Manager.
  • The GIT integration with Studio currently supports two-factor authentication only for GitHub if you authenticate by signing in to the service. For other tools, use the SSO authentication method with a personal token, or the basic access authentication method.

    The current guide details the steps for authenticating to a GitHub repository, but the Git integration in Studio is not limited to just this service.

    When cloning a remote GIT repository or copying the current project to an existing GIT repository using HTTPS for the first time, you must provide your GIT credentials. These credentials must be entered in the Use Credentials fields:

    When cloning a repository or copying the current project to an existing GIT repository using SSH for the first time, you have the option of using a private key:

    Enter the correct credentials and try again. You can also use Git Bash, for example, to clone your repository remotely and thus, check if the username and password are correct.

    In the following image, we tried to clone a repository over HTTPS, but entered an incorrect password. The Git Bash window shows that the credentials were incorrect.

    Enter the correct Private Key Path and Password and try again. You can also use Git Bash, for example, to clone your repository remotely and thus, check if the token and/or password are correct.

    In the following image, we tried to clone a repository over SSH, but we didn't have any public SSH keys set up on our account.

  • Select Use Credentials / Use Key and configure authentication (either sign in with GitHub, enter user and password, enter user and token for HTTPS, or enter private key path and password for SSH).
  • Click Open , Studio opens the project in the Designer panel.
  • In the Open window, select a project.json file to open in Studio.
    After cloning a GIT repository to a local working directory, the .git subdirectory is created containing the necessary GIT metadata. The metadata includes subdirectories for objects, refs, and template files. In addition, a HEAD file is also created, which points to the currently checked out commit.

    Click the GIT Init button, and then select a path where the repository should be initialized. The location may be the same as the project or the parent folder. The Commit changes window opens.

  • The Modified Files section shows the project’s files that are to be added to the Git repo. Clear the box next to the ones that you don’t want to add or use Select All , Select None .

    If you want to make modifications to the added repositories, simply click an entry, change the name and URL, then click the Update button. When you're done click Add , then Save . The following message box opens. This means that the local repository is not synchronized with the remote one.

  • Select the Amend Commit box. The last commit message is displayed, together with the files that were committed. To view changes between the current file and the last commit, use the Show Changes option.
  • Change the commit message and select the files that you would like to include. Click the Commit and Push or Commit button.

    Undoing Pending Changes

    Studio comes with the option to undo changes that have been made to versioned files, before you commit and push them to the remote repository.

    After making changes to a file in the local repository, click Undo in the GIT context menu to open the Undo Pending Changes window.

    Note: The Undo does not cover unversioned files. If you create new files and then select Undo , the files are not removed from the project. Once added to the project tree, new files remain there unless they are manually deleted.

    To merge a branch into the master of a GIT remote repository, you need to have the master branch checked out in Studio and then merge the modified branch into master.

    Note: Branches need to be added locally in Studio from the Manage Branches window. Adding branches from the remote GIT repository may cause issues when trying to switch between branches.

    To view the commit history for a project or for a specific file or folder in a project, right-click the project node, a file, or folder in the Project panel, and then select Show History . This opens the History window which displays a list of existing revisions for the selected file, folder, or project. For each commit, the commit hash, message, author, and date are displayed in a table on the upper part of the window. You can view more information about a selected commit in the Details and Changes tabs on the lower part of the window.

  • If you opened the history for a folder or project, select a commit in the History window, and then, in the Changes tab, double-click a file to compare it with its previous version.
  • If you disconnect a child project, then the entire GIT repository that contains the opened project is disconnected from source control. A message box is displayed in Studio requiring your confirmation before the disconnect action is performed.

    Depending on how the repository was cloned (via HTTPS or SSH), either sign in to a GitHub account (for repositories hosted on github.com only), enter the username/password or the username/token, or point to a new private key and click OK .

    The credentials are updated in the Windows Credential Manager.

    GIT integration in Studio supports accessing remote repositories if internet access is through a proxy server. This can be done in two ways: either configured at machine level in the Proxy Settings window or by making changes to git commands.
    Proxy details configured in the Proxy Settings window are taken into account, without the need of entering them in the .gitconfig file.
    To configure proxy details with git commands, add them to GIT configuration files in the following form:

    [http "https://domain.com"] proxy = http://proxyUsername:[email protected]:port

    GIT configuration files can be found at the following locations:

  • config file: %ProgramData%\Git
  • .gitconfig file: %UserProfile%
  • local config file from project level, for example %UserProfile%\Desktop estproject\.git .
  •