PhpStorm GitHubSupportinPhpStorm 200116 0042 2510
Transcript of PhpStorm GitHubSupportinPhpStorm 200116 0042 2510
7/25/2019 PhpStorm GitHubSupportinPhpStorm 200116 0042 2510
http://slidepdf.com/reader/full/phpstorm-githubsupportinphpstorm-200116-0042-2510 1/4
1.2.
GitHub Support in PhpStorm
Create a GitHub Repository from PhpStormClone a Repository from GitHubCreate a Gist on GitHubOpen on GitHubUsing the GitHub Issue TrackerCreating Pull RequestsRebase GitHub Fork
Create a GitHub Repository from PhpStorm
Whenever we want to start a new project on GitHub and work on it in PhpStorm, there are two possible approaches:
Create the project through GitHub.com and clone it in PhpStorm; orStart coding and when we want to commit, create the project on GitHub from within PhpStorm.
Once our project is ready to be published on GitHub, we can use the menu toVCS | Import into Version Control | Share project on GitHub start publishing the project.
After clicking the menu entry, we can provide some information about our GitHub project. We can provide the project name, a description and
whether we want it to be a private repository or not. Clicking will create the GitHub project and do an initial commit of source code.Share
Tweet
In the tutorial we have learned how we can work with version control systems (VCS). OneVersion Control Systems Support in PhpStormvery popular VCS is Git, driven by the collaboration that's possible using . In this tutorial, we will explore the GitHub integrations thatGitHubare available in PhpStorm.
When using , try out the which offers some of the functionality described below. It can be installed throughBitBucket BitBucket plugin
the .IDE Settings| Plugins
7/25/2019 PhpStorm GitHubSupportinPhpStorm 200116 0042 2510
http://slidepdf.com/reader/full/phpstorm-githubsupportinphpstorm-200116-0042-2510 2/4
We can now work with the actions described in the tutorial .Version Control Systems Support in PhpStorm
Clone a Repository from GitHub
To work with an existing project hosted on GitHub, we can use the menu . This will fetch a list ofVCS | Checkout from Version Control | GitHub all repositories that we can access using our account and allows us to clone those into a PhpStorm project.
Clicking will clone the project to the specified folder so we can work with it from our IDE.Clone
Create a Gist on GitHub
A simple way to share snippets and code or files with others when no full VCS system is needed is using "gists". They can be created, browsedand commented through . Instead of copy-pasting our gists into the browser, we can create them from within PhpStorm.gist.github.com
From any file that’s opened, we can make a selection of code and use the context menu. Since gists can consist of multiple files, weCreate Gist can also select multiple files in the project tool window and use the context menu from there. We can provide a description for our gist andoptionally make it private or anonymous.
7/25/2019 PhpStorm GitHubSupportinPhpStorm 200116 0042 2510
http://slidepdf.com/reader/full/phpstorm-githubsupportinphpstorm-200116-0042-2510 3/4
After we click , the gist will be created. We can with others.OK share the URL
Open on GitHub
To see all details like previous commits, comments, reviews and such for a file, we can use the context menu. This will launchOpen on GitHub the default browser and open the file we selected in GitHub. This allows us to see file history, explore branches and whatever other action we maywant to do through the GitHub web interface.
Using the GitHub Issue TrackerPhpStorm provides integration with various issue trackers, including the one provided by GitHub. Check the tutorial Integration with an Issue
to see how we can connect to a GitHub project issue tracker, work on tasks and automatically populate commitTracking System in PhpStormmessages.
Creating Pull Requests
Once work on our own branch or fork is done, we can create a pull request on GitHub to ask for a code review and/or inclusion of our changes
into the main repository. We can create a Pull Request from within PhpStorm, using the menu VCS | Git | Create Pull Request...
When creating the pull request, we can pick the base fork, the branch to which it applies, and provide a title and description for it. Clicking willOKsubmit the pull request, and we can start working on something else.
Rebase GitHub Fork
GitHub provides an easy way of forking someone's repository, but how do we keep our sources up to date with what happens on the remote?Using the menu , we can rebase our fork. For this to work, we will have to make sure the origin repository isVCS | Git | Rebase my GitHub fork...added as a remote. If this is not the case, PhpStorm will ask us to do so. Next, PhpStorm will provide us with a dialog in which we can providesome additional options for our rebase.
7/25/2019 PhpStorm GitHubSupportinPhpStorm 200116 0042 2510
http://slidepdf.com/reader/full/phpstorm-githubsupportinphpstorm-200116-0042-2510 4/4
Clicking will do exactly that: rebase our fork on the remote fork.Rebase
Tweet