DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Applying Oracle 19c Release Update (RU): A Practical Guide from My DBA Experience
  • IT Asset, Vulnerability, and Patch Management Best Practices
  • Zero-Touch Patch Management With PowerShell and Intune: How We Automated Compliance at Scale
  • When Airflow Tasks Get Stuck in Queued: A Real-World Debugging Story

Trending

  • Retesting Best Practices for Agile Teams: A Quick Guide to Bug Fix Verification
  • Catching Data Perimeter Drift Before It Reaches Production
  • When Perfect Data Breaks: The Journey from Data Quality to Data Observability
  • Edge Computing in Utility IoT: Two Architecture Patterns That Actually Work
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. Patching from Local History

Patching from Local History

By 
Irina Megorskaya user avatar
Irina Megorskaya
·
Feb. 21, 08 · News
Likes (0)
Comment
Save
Tweet
Share
9.8K Views

Join the DZone community and get the full member experience.

Join For Free

Using patches is a popular way to share changes between the teammates or supply updates to software products to the customers. With IntelliJ IDEA, creating and applying versioned patches is quite simple and intuitive: you can do it from the main Version Control menu, or from the Changes tool window.

However, IntelliJ IDEA suggests an additional way to create and apply your “personal” patches. As we have discussed earlier, numerous changes pass unnoticed by the version control systems, because you just do not check in every change you make to your files while working.

You know that IntelliJ IDEA keeps your own “personal version control” – the local history. Besides the possibility to roll back to a certain revision, you can also create a patch on the base of a revision or action, share it with your colleagues, and apply it when necessary.

Local history applies to the folders, files, members and fragments of text, but the technique of creating a patch is common in all cases. Let’s see how it’s done.

Select a folder in the Project tool window, and choose Local History on its context menu. In the Local History view, right-click the desired revision, and choose Create Patch:

[img_assist|nid=1204|title=|desc=|link=none|align=left|width=505|height=357]

 

 

 

 

 

 

 

 

 

 

 


In the dialog box that opens, specify the name and location of the patch file:

[img_assist|nid=1205|title=|desc=|link=none|align=left|width=415|height=136]

 

 

 

 

 

An interesting possibility is suggested by the Reverse patch checkbox. If you check this option, IntelliJ IDEA will create a patch that rolls back the selected action. For example, it you have created a file, the patch will delete it.

Applying your “personal” patch is done as usual, using the Apply Patch command on the main Version Control menu. If a patch file is stored in project, you can invoke this command on the context menu of the patch file in the Project tool window:

[img_assist|nid=1206|title=|desc=|link=none|align=left|width=249|height=195]
intellij History (command) Patch (computing) Version control

Opinions expressed by DZone contributors are their own.

Related

  • Applying Oracle 19c Release Update (RU): A Practical Guide from My DBA Experience
  • IT Asset, Vulnerability, and Patch Management Best Practices
  • Zero-Touch Patch Management With PowerShell and Intune: How We Automated Compliance at Scale
  • When Airflow Tasks Get Stuck in Queued: A Real-World Debugging Story

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook