Initializing a Git repository is often one of the first tasks that is performed when starting a new project. Initializing a repository creates the local repository and allows local source control actions to be performed such as checking in code and viewing a file's history.
In this recipe, we'll see how NetBeans allows us to initialize a Git repository for a specific project and how this gives us benefits over using the Git command-line tools.
You can use any of the Java download bundles of NetBeans (Java SE, Java EE, or the All bundle) to complete this recipe as they all have Git support built into NetBeans.
We will be initializing the JarViewer
project that we created in Chapter 4, Developing Desktop Applications with NetBeans, so if you did not complete the recipes in that chapter, you will need to locate the JarViewer
project from the code download bundle for this book.