Recently I started to use Netbeans again to do some JAVA development. I was involved in a project that required code sharing across the participants. we used GIT for code versioning, which I had to learn, so I decided to write this short tutorial on GIT used inside of Netbeans.
Clone a repository:
The first thing you would want to do is clone a repository. Cloning a repository involves making a local copy of the current repository. Conversely, if a repository for the project in question didn’t exist, then you would want to Initialize a repository. So I cloned the repository by clicking on the menu TEAM->Git->Clone. I was then greeted with the below screen where i entered the URL, User, & Password, then clicked Next.
Next brought me to the below screen where I chose the Branch I would like to clone. Branches on GIT are like branches on trees, you can have various versions of the same solution but the branches represent permutations of the came code. Meaning, I can branch the main project and decide to add a feature that is not in the “master” branch. Off course this functionality can later be “merged” into the master branch to become part of the main code. I then clicked Next.
Next brought me to the final screen which confirmed which local folder I wanted the files to be placed, I also got the option to scan for Netbeans projects after the clone. After that I clicked Finish