Tag Archives: Git

Commonly Used Git Commands With Samples

Git is a powerful version control system. One big differentiator from traditional version control systems is that it’s fully ditributed. In other words, there is no central repository and everyone can have a full clone of everything.

There are many articles and tutorials about GIT already. A while back, I also wrote a few articles on the Java APIs to the JGit implementation. This post is simply a collection of some commands that I use on daily basis. This is just for my quick reference or cheat sheet and nothing more. If you find it’s helpful, it’s great.

Posted in Applications & Tools | Also tagged | Leave a comment

GIT Commands Using Java APIs

In previous posts, I’ve covered an Java API called JGIT for working with GIT. Besides the low level APIs, JGIT also supports high level command line like interfaces. If you know how to use the GIT command line, you can use the APIs. Note that it’s different from calling GIT commands or any other commands from Java code.

Here is a sample code I wrote to try out the APIs. Give it a try and you will like these high level APIs.

Posted in Software Development | Also tagged | 10 Responses

How to Use GIT Java APIs to Diff Two Different Files

In my previous post, I introduced a sample showing how to use JGIT Java APIs to diff two versions of a same file in repository. The JGIT Java APIs can do more than that – it can actually diff two text files that are not even controlled by GIT.
Here is a short sample code on how to do this. Again, it’s not the main use case for the JGIT APIs. After all, it’s mainly for GIT source control system itself. You can always use other diff APIs for this purpose. However, if you already have JGIT included, this can be handy.

Posted in Software Development | Also tagged | 1 Response

How to Use GIT Java APIs to Diff Different Versions

Last week I introduced the JGIT Java API with a simple sample illustrating how to read content from HEAD. If you have multiple versions of a source code or text file, you may want to see their differences. An easy tool for this is the standard diff.

The JGIT Java API has built-in support for you to generate diff between any two versions of a file, be it a source code, properties file, XML file, or any other text files. Here is a sample that shows how to do this.

Posted in Software Development | Also tagged | 6 Responses

How to Read GIT Repository Using Java APIs

GIT is a source code control system created by Linus and others for managing Linux kernel development. It becomes one of the most popular version control systems especially in the open source community. Most developers use command line or the plugins to IDEs like Eclipse, NetBeans. I think even Microsoft VisualStudio has add-on for connecting to GIT, but I haven’t checked it.

Posted in Software Development | Also tagged , | 14 Responses

Eclipse Day at GooglePlex: A Brief Trip Report

I attended Eclipse Day at Google headquarter today. It’s a great event packed with several great talks.

Mobile application is for sure a hot topic these days. There were several talks on mobile application development like Android Tools for Eclipse by Xavier Ducrohet from Google, Eclipse Sequoyah for Android App Developers by Eric Cloninger from Motorola, Tools for Mobile Web by Paul Beusterien from Symbian Foundation, and EMF for GWT by Ed Merks from Cloudsmith.

While sitting in the talk on Instantiations Eclipse Tools, I learned that Google bought the company 3 weeks ago. I expect Google will soon make WindowsBuilder, a famous WYSIWYG GUI authoring tool, free for GWT users, therefore further drive the adoption of GWT in competition with Flex, SilverLight.

Posted in News & Events, Software Development | Also tagged , , , , | 1 Response

    My company has created products like vSearch ("Super vCenter"), vijavaNG APIs, EAM APIs, ICE tool. We also help clients with virtualization and cloud computing on customized development, training. Should you, or someone you know, need these products and services, please feel free to contact me: steve __AT__ doublecloud.org.

    Me: Steve Jin, VMware vExpert who authored the VMware VI and vSphere SDK by Prentice Hall, and created the de factor open source vSphere Java API while working at VMware engineering. Companies like Cisco, EMC, NetApp, HP, Dell, VMware, are among the users of the API and other tools I developed for their products, internal IT orchestration, and test automation.