Skip to main content
Jump to: navigation, search

EclipseLink/Development/Process/Git

< EclipseLink‎ | Development‎ | Process
Revision as of 17:12, 19 March 2012 by Michael.norman.oracle.com (Talk | contribs) (Windows)

EclipseLink Development in Git

This page is for the Git usage portion of the dev process. It does not discuss issues with the build in Git, for more information on that please see: wiki.eclipse.org/EclipseLink/Build/Git .

This page is a work in progress, posing the questions that need to be answered.  If you feel that you have more questions, please post them, if you can answer a question, please do.

EclipseLink Git FAQ

Brief Overview and History of Git

Git is a Distributed Version Control System (DVCS), which means there is no single point-of-failure and one can do useful work without a server. The ability to work while disconnected is very useful if a server is down or if the network connection to a server is unreliable (slow or firewalled).

The distributed nature of Git means that the source code is inherently backed-up across all the various 'clones' that may exist 'out there.' In addition, Git supports types of work-flows that are different from those supported by Subversion; these work-flows, while unfamiliar, are quite powerful and can 'overlap' - one developer may prefer a 'golden repository' work-flow while another likes 'trusted-lieutenants'; both can be supported simultaneously by the same repository.

Git was created by Linus Torvalds in 2005 to handle the source control requirements of the Linux kernel project. Linus previously used a for-pay DVCS called BitKeeper and grew to like the 'trusted -lieutenants' work-flow; however, the special license grant that let him use BitKeeper for free for kernel development changed. Shortly thereafter, he created Git. By 2008, other major open-source projects (Ruby-on-Rails, Android, etc.) moved to it as well.

GitArch.png

How do I get started?

As shown in the picture above, graphical clients are typically not shipped with the 'core' Git distribution. There are a number of use-cases that only make sense (or only work!) from the command-line.

The 'core' Git distribution can be downloaded from the Git download site (http://git-scm.com/download) - there are links for a variety of operating systems (Linux, Mac OS X, Windows). Once you have the Git tools, you can always get the latest_&_greatest version of Git directly from its own repository:

prompt > git clone git://github.com/gitster/git.git

If you have problems connecting (Git uses port 9418), you can try to access the repository over the HTTP protocol
(typically most Git server administrators set up HTTP access as read-only):

prompt > git clone http://github.com/gitster/git.git

Documentation

The central Git web-site holds the documentation for the 'core' Git distribution. In addition, there are also links to docs written by others. I would like to highlight one particular resource as very useful
Progit.jpg "Pro Git - professional version control" by Scott Chacon, CIO of GitHub.

Windows

The unfortunate truth is that Git - both its 'core' footprint as well as Windows-specific GUI clients like Tortoise Git - is a second-class citizen on Windows. Much of the 'plumbing' (see picture above) was originally written as shell-scripts. Even though most of Git is now written in 'C', the basic 'world-view' is that directories use the '/' separator, files can be mixed-case and symbolic links are used to implement a number of useful Git features (sub-modules, multiple-branch view working directories, etc.) Because of this, Windows versions of Git tools are marked as 'beta/preview' (and probably always will be).

For those using Windows (XP or 7), I recommend using Tortoise Git

  • pre-requisite: install Windows command-line msysgit Git tools first "Full installer for official Git for Windows"
    • Install Wizard (accept most defaults)
    • Command Line: Use Git Bash Only
    • Choosing the SSH executable: Use TortoisePLink (comes from Putty, integrates well with Windows)
  • Tortoise Git Install Wizard
    • asks about SSH: use same answer as above

How does Git differ from SVN?

How do patches in Git differ from in SVN?

How is merging different between Git and SVN

How do I work on two different tasks at the same time?

What do I do when I am working on a large task, and have to put it aside to complete a shorter task?

What is the difference between a git fetch, git pull and git clone?

When/how do I create branches?

After the server branches, how do I get the information to my local repo?

What tools do you recommend, what are their strengths and weaknesses?

I've seen some issues with renaming things and how those things behave when other people update. Are there any gotchas?

What is Git Rebase? When would I use it?

How do I verify that 'what I push to the repo is actually there'?

Back to the top