Book Image

NetBeans IDE 8 Cookbook

By : David Salter, Rhawi Dantas
Book Image

NetBeans IDE 8 Cookbook

By: David Salter, Rhawi Dantas

Overview of this book

<p>From the start to the end of a Java project's lifecycle, this book will show you how to perform many key tasks with the NetBeans IDE, uncovering more about mobile, desktop, and enterprise Java along the way.</p> <p>You will start by creating Java projects and learning how to refactor and use NetBeans tools to increase developer efficiency. You will then get a walkthrough of how to create a desktop application before covering JavaFX and mobile applications and how to use external services within them. Having seen how to create many different types of applications, you will then be shown how to test and profile them before storing them in revision control systems such as Git or Subversion. Finally, you will learn how to extend NetBeans itself by adding new features to the IDE.</p>
Table of Contents (19 chapters)
NetBeans IDE 8 Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Initializing a Git repository


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.

Getting ready

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.

How to do it…

To initialize a Git repository, perform the following steps:

  1. Right...