Как подключить гитхаб к вебшторм

Set up a Git repository

When you clone an existing Git repository, or put an existing project under Git version control, WebStorm automatically detects if Git is installed on your computer. If the IDE can’t locate a Git executable, it suggests downloading it.

WebStorm supports Git from the Windows Subsystem for Linux 2 (WSL2), which is available in Windows 10 version 2004.

If Git is not installed on Windows, WebStorm searches for Git in WSL and uses it from there. Also, WebStorm automatically switches to Git from WSL for projects that are opened when you use the \\wsl$ path.

Check out a project from a remote host (clone)

WebStorm allows you to check out (in Git terms clone ) an existing repository and create a new project based on the data you’ve downloaded.

In the Get from Version Control dialog, specify the URL of the remote repository you want to clone, or select one of the VCS hosting services on the left.

If you are already logged in to the selected hosting service, completion will suggest the list of available repositories that you can clone.

If your project contains submodules, they will also be cloned and automatically registered as project roots.

Put an existing project under Git version control

You can create a local Git repository based on an existing project sources.

Associate the entire project with a single Git repository

Open the project that you want to put under Git.

Choose Enable Version Control Integration from the VCS Operations Popup Alt+` or from the main VCS menu.

After VCS integration is enabled, WebStorm will ask you whether you want to share project settings files via VCS. You can choose Always Add to synchronize project settings with other repository users who work with WebStorm.

Как подключить гитхаб к вебшторм. Смотреть фото Как подключить гитхаб к вебшторм. Смотреть картинку Как подключить гитхаб к вебшторм. Картинка про Как подключить гитхаб к вебшторм. Фото Как подключить гитхаб к вебшторм

Associate different directories within the project with different Git repositories

Open the project that you want to put under Git.

In the dialog that opens, specify the directory where a new Git repository will be created.

Git does not support external paths, so if you choose a directory that is outside your project root, make sure that the folder where the repository is going to be created also contains the project root.

If you are creating multiple Git repositories inside the project structure, repeat the previous steps for each directory.

After you have initialized a Git repository for your project, you need to add project files to the repository.

Add files to the local repository

Select the files you want to add to Git or the entire changelist and press Ctrl+Alt+A or choose Add to VCS from the context menu.

You can also add files to your local Git repository from the Project tool window: select the files you want to add, and press Ctrl+Alt+A or choose Git | Add from the context menu.

Exclude files from version control (ignore)

Sometimes you may need to leave certain files unversioned. These can be VCS administration files, artifacts of utilities, backup copies, and so on. You can ignore files through WebStorm, and the IDE will not suggest adding them to Git and will highlight them as ignored.

Git lets you list ignored file patterns in two kinds of configuration files:

Patterns listed in this file only apply to the local copy of the repository.

This file is created automatically when you initialize or check out a Git repository.

These files are checked into the repository so that the ignore patterns in them are available to the entire team. Therefore, it is a most common place to store the ignored file patterns.

Locate the unversioned file or folder you want to ignore in the Local Changes view or in Project tool window. File colors in these views help you identify the status of the file.

File colors in these views help you identify the status of the file.

Check project status

WebStorm allows you to check the status of your local working copy compared to the repository version of the project. It uses specific colors to let you see which files have been modified, which new files have been added to the VCS, and which files are not being tracked by Git.

Open the Local Changes view.

Как подключить гитхаб к вебшторм. Смотреть фото Как подключить гитхаб к вебшторм. Смотреть картинку Как подключить гитхаб к вебшторм. Картинка про Как подключить гитхаб к вебшторм. Фото Как подключить гитхаб к вебшторм

    The Changes changelist shows all files that have been modified since you last synchronized with the remote repository (highlighted in blue), and all new files that have been added to the VCS but have not been committed yet (highlighted in green).

    The Unversioned Files changelist shows all files that have been added to your project, but that are not being tracked by Git.

    Track changes to a file in the editor

    You can also track changes to a file as you modify it in the editor. All changes are highlighted with change markers that appear in the gutter next to the modified lines, and show the type of changes introduced since you last synchronized with the repository. When you commit changes to the repository, change markers disappear.

    The changes you introduce to the text are color-coded:

    Как подключить гитхаб к вебшторм. Смотреть фото Как подключить гитхаб к вебшторм. Смотреть картинку Как подключить гитхаб к вебшторм. Картинка про Как подключить гитхаб к вебшторм. Фото Как подключить гитхаб к вебштормline added.

    Как подключить гитхаб к вебшторм. Смотреть фото Как подключить гитхаб к вебшторм. Смотреть картинку Как подключить гитхаб к вебшторм. Картинка про Как подключить гитхаб к вебшторм. Фото Как подключить гитхаб к вебштормline changed.

    Как подключить гитхаб к вебшторм. Смотреть фото Как подключить гитхаб к вебшторм. Смотреть картинку Как подключить гитхаб к вебшторм. Картинка про Как подключить гитхаб к вебшторм. Фото Как подключить гитхаб к вебштормline deleted.

    You can manage changes using a toolbar that appears when you hover the mouse cursor over a change marker and then click it. The toolbar is displayed together with a frame showing the previous contents of the modified line:

    Как подключить гитхаб к вебшторм. Смотреть фото Как подключить гитхаб к вебшторм. Смотреть картинку Как подключить гитхаб к вебшторм. Картинка про Как подключить гитхаб к вебшторм. Фото Как подключить гитхаб к вебшторм

    Instead of reverting the whole file, you can copy any part of the contents of this popup and paste it into the editor.

    Add a remote repository

    If you created a Git repository based on local sources, you need to add a remote repository to be able to collaborate on your Git project, as well as to eliminate the risks of storing all of your codebase locally. You push changes to a remote repository when you need to share your work and pull data from it to integrate changes made by other contributors into your local repository version.

    Define a remote

    Create an empty repository on any Git hosting, such as Bitbucket or GitHub. You can create a repository on GitHub without leaving WebStorm: see Share a project on GitHub.

    If you haven’t added any remotes so far, the Define remote link will appear instead of a remote name. Click it to add a remote.

    Add a second remote

    In some cases, you also need to add a second remote repository. This may be useful, for example, if you have cloned a repository that you do not have write access to, and you are going to push changes to your own fork of the original project. Another common scenario is that you have cloned your own repository that is somebody else’s project fork, and you need to synchronize with the original project and fetch changes from it.

    To edit a remote (for example, to change the name of the original project that you have cloned), right-click the remote branch in the Branches pane of the Git Log tool window, and select Edit Remote from the context menu.

    You can also edit a remote from the Push Dialog by clicking its name.

    To remove a repository that is no longer valid, right-click it in the Branches pane of the Git Log tool window, and select Remove Remote from the context menu.

    Источник

    Русские Блоги

    Установка Webstorm, настройка Github и Git

    Во-первых, установите Webstorm

    1. Ресурсы Webstorm

    Адрес загрузки Webstorm: https://www.jetbrains.com/webstorm/

    Юридический адрес: http://idea.lanyus.com

    2. Выполните установку.

    Как подключить гитхаб к вебшторм. Смотреть фото Как подключить гитхаб к вебшторм. Смотреть картинку Как подключить гитхаб к вебшторм. Картинка про Как подключить гитхаб к вебшторм. Фото Как подключить гитхаб к вебшторм

    3. Зарегистрируйте программное обеспечение.

    Сейчас можно зарегистрировать только версию 3.2, последнюю версию зарегистрировать нельзя

    Во-вторых, настройте Github и Git

    1. Во-первых, вы должны иметь учетную запись Github и зарегистрироваться.

    2. Войдите на страницу настроек и действуйте, как показано на рисунке или Сочетание клавиш ctrl + alt + s

    Как подключить гитхаб к вебшторм. Смотреть фото Как подключить гитхаб к вебшторм. Смотреть картинку Как подключить гитхаб к вебшторм. Картинка про Как подключить гитхаб к вебшторм. Фото Как подключить гитхаб к вебшторм

    3. Настройте Github.

    Как подключить гитхаб к вебшторм. Смотреть фото Как подключить гитхаб к вебшторм. Смотреть картинку Как подключить гитхаб к вебшторм. Картинка про Как подключить гитхаб к вебшторм. Фото Как подключить гитхаб к вебшторм

    Введите пароль своей учетной записи github, не забудьте проверить, если конфигурация прошла успешно, появится следующее всплывающее окно

    Как подключить гитхаб к вебшторм. Смотреть фото Как подключить гитхаб к вебшторм. Смотреть картинку Как подключить гитхаб к вебшторм. Картинка про Как подключить гитхаб к вебшторм. Фото Как подключить гитхаб к вебшторм

    4. Настройте Git.
    Сочетание клавиш ctrl + alt + s для входа на страницу настроек, как показано на рисунке.

    Как подключить гитхаб к вебшторм. Смотреть фото Как подключить гитхаб к вебшторм. Смотреть картинку Как подключить гитхаб к вебшторм. Картинка про Как подключить гитхаб к вебшторм. Фото Как подключить гитхаб к вебшторм

    Как подключить гитхаб к вебшторм. Смотреть фото Как подключить гитхаб к вебшторм. Смотреть картинку Как подключить гитхаб к вебшторм. Картинка про Как подключить гитхаб к вебшторм. Фото Как подключить гитхаб к вебшторм

    Как подключить гитхаб к вебшторм. Смотреть фото Как подключить гитхаб к вебшторм. Смотреть картинку Как подключить гитхаб к вебшторм. Картинка про Как подключить гитхаб к вебшторм. Фото Как подключить гитхаб к вебшторм

    Как подключить гитхаб к вебшторм. Смотреть фото Как подключить гитхаб к вебшторм. Смотреть картинку Как подключить гитхаб к вебшторм. Картинка про Как подключить гитхаб к вебшторм. Фото Как подключить гитхаб к вебшторм

    Как подключить гитхаб к вебшторм. Смотреть фото Как подключить гитхаб к вебшторм. Смотреть картинку Как подключить гитхаб к вебшторм. Картинка про Как подключить гитхаб к вебшторм. Фото Как подключить гитхаб к вебшторм

    Поместите сгенерированный открытый ключ id_rsa.pub в поле ввода ключа и установите заголовок для текущего ключа, чтобы различать каждый ключ.

    Как подключить гитхаб к вебшторм. Смотреть фото Как подключить гитхаб к вебшторм. Смотреть картинку Как подключить гитхаб к вебшторм. Картинка про Как подключить гитхаб к вебшторм. Фото Как подключить гитхаб к вебшторм

    В-третьих, используйте VCS в Webstorm

    1. Загрузите проект с github на локальный

    Как подключить гитхаб к вебшторм. Смотреть фото Как подключить гитхаб к вебшторм. Смотреть картинку Как подключить гитхаб к вебшторм. Картинка про Как подключить гитхаб к вебшторм. Фото Как подключить гитхаб к вебшторм

    Как подключить гитхаб к вебшторм. Смотреть фото Как подключить гитхаб к вебшторм. Смотреть картинку Как подключить гитхаб к вебшторм. Картинка про Как подключить гитхаб к вебшторм. Фото Как подключить гитхаб к вебшторм

    2. Отправьте изменения на удаленный склад github.

    Источник

    Русские Блоги

    Как загружать проекты на GitHub с помощью webstorm

    2. Как показано на рисунке ниже, найдите github в месте поиска, а затем на снимке экрана здесь показан Git, снимок экрана неправильный.
    Как подключить гитхаб к вебшторм. Смотреть фото Как подключить гитхаб к вебшторм. Смотреть картинку Как подключить гитхаб к вебшторм. Картинка про Как подключить гитхаб к вебшторм. Фото Как подключить гитхаб к вебшторм
    3. Как показано на рисунке ниже, нажмите «Добавить учетную запись», появится всплывающее окно для входа, введите имя пользователя и пароль непосредственно ниже, а затем нажмите «Войти».
    Как подключить гитхаб к вебшторм. Смотреть фото Как подключить гитхаб к вебшторм. Смотреть картинку Как подключить гитхаб к вебшторм. Картинка про Как подключить гитхаб к вебшторм. Фото Как подключить гитхаб к вебшторм
    4. После успешного подключения мы должны подключиться к загруженному Git. Тем не менее, поищите git в месте поиска и введите путь установки Git в поле «Путь к исполняемому файлу Git». Обычно его можно получить здесь автоматически, а затем нажмите кнопку «Проверить» рядом с ним, и он появится. Среднее всплывающее окно указывает, что соединение успешно.
    Как подключить гитхаб к вебшторм. Смотреть фото Как подключить гитхаб к вебшторм. Смотреть картинку Как подключить гитхаб к вебшторм. Картинка про Как подключить гитхаб к вебшторм. Фото Как подключить гитхаб к вебшторм
    5. Поскольку передача данных между нашим локальным репозиторием Git и репозиторием GitHub зашифрована через SSH, нам необходимо настроить информацию для аутентификации.

    При первом запуске этой команды может появиться сообщение, просто введите да. Наконец, если возвращается следующая информация, это означает, что вы успешно подключились к GitHub.

    На этом этапе вся конфигурация завершена, мы можем использовать WebStorm для загрузки локального проекта в GitHub.

    Источник

    GitHub

    Register a GitHub account

    To be able to retrieve data from a repository hosted on GitHub, or share your projects, you need to register your GitHub account in WebStorm.

    If you do not want to specify your credentials each time you sync with a remote, or push your commits, you can configure WebStorm to save your account information (see Configure a password policy).

    Register an existing account

    In the dialog that opens, specify your GitHub server URL (either github.com, or an enterprise instance).

    Do one of the following:

    If you already have a token, click the Use Token link and paste it there.

    If you want to obtain a new token, enter your login and password. If you have two-factor authentication enabled, you will be asked to enter a code that will be sent to you by SMS or through the mobile application. See Creating a personal access token for more details on GitHub tokens.

    Create a new GitHub account

    Register your account on the Sign up for GitHub page that opens.

    Return to the WebStorm settings and specify your credentials.

    Manage multiple accounts

    You can use multiple GitHub accounts in WebStorm: for example, a personal account to work on an open-source project, and a corporate account for your main job.

    If you cannot view pull requests in the IDE, or you get an error when you log in to a GitHub account and perform any git operation, refer to the Operations Against a GitHub Repository Are Failing article for troubleshooting tips.

    Источник

    Добавить комментарий

    Ваш адрес email не будет опубликован. Обязательные поля помечены *