`

[转]Using GIT with Zend Studio

阅读更多

      下面的内容是关于在Zend Studio 8中借助Eclipse的plugin EGit来使用Git功能的,其repository托管与GITHUB上.

      Using GIT with Zend Studio


Hy fellows,

in one of my last posts I described how to use GIT under Windows.

Now as Zend released Zend Studio 8 and ZF migrates to GIT with the next major release it’s time so see how those can be matched to work together. Note that this is not fixed to Windows but should work regardless of the use OS in any environment.

Prerequisits
What do you need to start?

I assume that you already have a working GITHUB repository as described in the last post.
Then you need a installed version of Zend Studio 8 or newer.

Installing GIT
Now you need to make your Zend Studio aware of GIT. Therefor we need to install EGit. EGit is a module for Eclipse which makes Zend Studio (which is based on Eclipse) understand GIT and provides several tools for working with GIT.

  • To install EGit open Zend Studio
  • Click “Help”
  • Click “Install New Software…”
  • Click “Add…”
  • Enter “EGit” as “Name”
  • Enter “http://download.eclipse.org/egit/updates” as “Location”
  • Select all modules by clicking “Select all” (you could omit the two moduls only containing “Source” if wished)
  • Click “Next” until you see the license agreements
  • Click “Agree” on all license agreements (of course read the agreements before you agree)
  • At last click “Finish”

Now EGit will be installed within Zend Studio. As last step you will need to restart Zend Studio (if it is not done automatically).

Security preparations

When you already used GIT you will know that it needs RSA keys. So our next step is to make new keys which will be used within Zend Studio to commit to GITHUB.

  • Open Zend Studio
  • Click “Window”
  • Click “Preferences”
  • Expand “General”
  • Expand “Network Connections”
  • Open “SSH2”
  • Go to the tab “Key Management”

Now you can eighter use an existing key or add a new one.

To load an existing key:

  • Click “Load Existing Key…”
  • Within the explorer window go to the directory where you stored the existing key for GITHUB and select it
  • Enter the “Passphrase” when your key needs a passphrase
  • Confirm the “Passphrase” when your key needs a passprase
  • Click “OK”

It is preferred to make a new key instead of loading an existing one. Therefor:

  • Click “Generate RSA Key…”
  • Leave the passphrase empty (this simplifies the later handling)
  • Click “Save Private Key…”
  • Click “OK” to confirm that you want no passphrase
  • Within the explorer window go to the directory where you want to store your keys
  • Click “OK”
  • Click “OK” once more
  • Open GITHUB within your Internet Browser and login to your account
  • Click “Account Settings…”
  • Click “Public SSH Keys…”
  • Click “Add another public key…”
  • Enter “Zend Studio” as Title
  • Copy the public key which you can see within Zend Studio as key into GitHub
  • Click “Add Key…”

At last, regardless is you added an existing or created a new key, click “OK” within Zend Studio to close the preferences window and save the settings. You have successfully prepared Zend Studio to be used with your GitHub account.

Connecting to GitHub

The next step is to connect our GITHUB account to Zend Studio.

  • Open Zend Studio
  • Click “File”
  • Click “Import…”
  • Now expand “GIT”
  • Select “Projects from GIT”
  • Click “Next”
  • Click “Clone…”
  • Open a Internet Browser and login to your GITHUB account
  • Click your ZF2 repository
  • Click”HTTP” (it is near SSH, HTTP…)
  • Copy the link which is shown (should look like “https://accoutname@github.com….” into your clipboard
  • Copy the link from your clipboard into “URI” within the opened Zend Studio tab
  • Enter your GITHUB password within “Password”
  • Click “Next”
  • Click “Next” once more to add all branches
  • Enter the directory into “Directory” where you want to store the local repo (this should be an empty/new directory)
  • Click “Finish”

This step will take several minutes as it now copies your remote repository to your local drive.
We’re done. You have successfully connected your GIT repository with Zend Studio.

You can now do your complete work from within Zend Studio. It supports all needed tools. Some of these tasks I will describe now:

Create a new branch

To create a new branch do the following:

  • Right-Click your project
  • Click “Team”
  • And then click “Branch…”
  • Click “New Branch…”
  • Enter the name of the new branch to “Branch Name…”
  • Select “Rebase” (with “None” you will not be able to commit your changes to your GitHub account)
  • Click “Finish”

Now you’re working within a new created branch.
Keep in mind to use the proper naming convention.
“hotfix/ZFxxxx” for quick fixes and “feature/XXXX” for new features. Always use “ZFxxxx” when there is a related issue within Jira.

Committing changes

Committing your changes is also quite simple:

  • Right-Click your project
  • Click “Team”
  • Click “Commit”
  • Enter a note about what you’re committing within “Commit Message…”

I always use notes like this:

[feature/MyFeature]
 - changed something
 - another change


  • Select the files which you want to commit
  • Click “Finish”

Now your change is stored in your local repository. To send your changes to your GITHUB repository you need to do the following:

  • Right-Click your project
  • Click “Team”
  • Click “Push to Upstream”
  • Click “OK”

At last your changes are also available within your GITHUB repository.
To have your change integrated within ZF2 you need to make a “Pull-Request” from your GITHUB repository.

The above description does not only work for Zend Framework but can also be used for other projects.
I hope you find this post interesting so I wish you a good work and have fun with GIT.

Greetings
Thomas Weidner
I18N Team Leader, Zend Framework

Zend Framework Advisory Board Member
Zend Certified Engineer for Zend Framework

分享到:
评论

相关推荐

    Zend Studio + Zend Studio Server 安装和配置

    Zend Studio 支持多种版本控制系统,如Git、SVN等。你可以通过IDE内的集成工具进行代码版本控制,实现团队协作。 在实际操作过程中,可能会遇到各种问题,如依赖库不兼容、权限问题、网络连接错误等。遇到这些问题...

    zend studio 8.0 注册机

    【标题】:“zend studio 8.0 注册机” 【知识点详解】 Zend Studio 是一个强大的集成开发环境(IDE),专为PHP开发设计。版本8.0是该软件的一个早期版本,提供了一系列先进的功能,帮助开发者编写、调试和优化PHP...

    Zend Studio 13.0.1.zip

    Zend Studio是一个屡获大奖的专业PHP集成开发环境,具备功能强大的专业编辑工具和调试工具,支持PHP语法加亮显示,支持语法... Git和Github支持云开发部署深度,Zend Framework和Zend Server集成更快、更精简的IDE。

    Zend Studio - 7.2.1汉化包

    【标题】"Zend Studio - 7.2.1汉化包"所指的是一款针对 Zend Studio 7.2.1 版本的专业开发环境的中文语言包。 Zend Studio 是一个强大的PHP集成开发环境(IDE),由Zend Technologies公司开发,专为PHP开发提供全面...

    zend studio 文档

    **Zend Studio文档** Zend Studio是一款强大的集成开发环境(IDE),专为PHP开发设计,由Zend Technologies公司开发。它提供了一整套工具,帮助开发者高效地编写、测试和调试PHP代码,是专业PHP开发者的重要工具。 ...

    zend studio 8.0.1汉化包

    7. **版本控制集成**:Zend Studio通常集成了常见的版本控制系统,如Git、SVN等,方便团队协作和代码管理。 总的来说,"zend studio 8.0.1汉化包"涉及的核心知识点是PHP开发环境的优化和本地化,使得开发者能够更...

    zend studio7.1.2注册码 教程

    通过使用 Zend Studio,开发者可以有效地缩短开发周期并简化复杂的应用开发过程。 #### 二、Zend Studio 特点 - **全面的编辑功能**:支持代码高亮、语法自动缩进、书签功能等。 - **强大的调试工具**: - 支持...

    zend studio视频教程

    【zend studio视频教程】 Zend Studio是一款专为PHP开发设计的集成开发环境(IDE),由 JetBrains 公司旗下的 Zend Technologies 开发。它提供了丰富的功能,旨在提高PHP开发者的效率和代码质量,是PHP开发者的...

    zend studio 8注册码

    同时,随着技术的发展,目前市场上已经有许多更新的版本可供选择,开发者可以根据自身需求和项目特性来决定是否继续使用Zend Studio 8或者尝试其他版本。 请注意,本篇文章提及的注册码示例“36161B4937FD7618B4937...

    ZendStudio13.6.1补丁加注册码

    **一、Zend Studio 13.6.1简介** Zend Studio 13.6.1 是 Zend Technologies 推出的针对 PHP 开发的最新版本,旨在提高开发效率和代码质量。这个版本可能包含了对先前版本的性能优化、新功能添加以及错误修复。通过...

    zendstudio7.12汉化包及下载地址

    在中文环境中,为了方便国内用户更好地理解和使用,出现了“zendstudio7.12汉化包”,它提供了将原版英文界面翻译成中文的功能,极大地降低了使用门槛,提升了用户体验。 首先,我们来了解下Zend Studio 7.12的主要...

    ZendStudio7详细使用化教程

    ### ZendStudio7详细使用教程知识点解析 #### 一、引言 在PHP开发领域,选择合适的集成开发环境(IDE)至关重要。本教程旨在详细介绍ZendStudio7的使用技巧,帮助PHP开发者提升开发效率。尽管ZendStudio7与后续版本...

    ZendStudio-7.2.0中文包

    【 Zend Studio 7.2.0 中文版详解】 Zend Studio 是一款强大的集成开发环境(IDE),专为 PHP 开发者设计,它以其高效的代码编辑、调试和优化工具而受到广泛赞誉。7.2.0 版本是该软件的一个重要里程碑,提供了许多...

    zendStudio 5

    zendStudio 5提供了一流的代码编辑功能,包括智能代码补全、语法高亮和错误检测。它能自动识别并提示PHP类库、函数和常量,帮助开发者快速编写代码。此外,它的代码折叠功能使得大型项目中的代码组织更加有序,提高...

    Zend Studio 7.1.2注册码和汉化包and官方下载地址

    **一、 Zend Studio简介** Zend Studio 是由 Zend Technologies 公司开发的一款专业级的PHP集成开发环境(IDE),它以其强大的功能和对PHP的深度支持,深受全球PHP开发者喜爱。在版本 7.1.2 中,该软件提供了丰富的...

    ZendStudio修改SVN信息

    ### ZendStudio中SVN信息的修改与配置 #### 一、概述 在软件开发过程中,版本控制工具如Subversion (SVN) 和 Git 的使用变得越来越普遍。它们可以帮助团队有效地管理代码版本,确保项目的稳定性和可追溯性。Zend...

    ZendStudio 13.5.1 Mac.zip

    本软件为Zend Studio Mac IOS苹果版。Zend Studio是一个屡获大奖的专业PHP集成开发环境,具备功能强大的专业编辑工具和调试... Git和Github支持云开发部署深度,Zend Framework和Zend Server集成更快、更精简的IDE。

    zend studio7教程

    7. **版本控制系统集成**:Zend Studio 支持多种版本控制系统,如Git、SVN等。你可以直接在IDE内进行版本控制操作,如提交、拉取、合并等。 **五、PHP单元测试** 8. **PHP单元测试**:通过集成的PHPUnit,你可以...

    zendstudio5.0下载

    1. **智能代码助手**:Zend Studio 5.0内置了智能代码完成功能,可以根据上下文自动补全代码,减少手动输入的时间,提高编程效率。它还支持语法高亮、代码折叠和错误检查,帮助开发者在编写过程中避免语法错误。 2....

    Zend Studio 7.1.2 汉化包

    **Zend Studio 7.1.2 汉化包详解** **一、 Zend Studio简介** Zend Studio 是由 Zend Technologies 公司开发的一款专业且功能强大的 PHP 集成开发环境(IDE),它专为 PHP 开发者设计,提供了一整套工具和服务,以...

Global site tag (gtag.js) - Google Analytics