Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!

Bug 203327

Summary: [71cat] integrated Git support wont work if repository stored in other dir than project
Product: versioncontrol Reporter: muellermi <muellermi>
Component: GitAssignee: astashkova <astashkova>
Status: RESOLVED FIXED QA Contact: issues <issues.netbeans.org>
Priority: P2 CC: astashkova, git
Version: 7.1   
Target Milestone: 7.1   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Issue Type: DEFECT Exception Report:

Description muellermi 2011-10-07 19:42:00 UTC
Product Version = NetBeans IDE Dev (Build 201110070600)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0
Runtime = Java HotSpot(TM) 64-Bit Server VM 21.0-b17

From Git tutorial:

"Initializing a Git Repository

To initialize a Git repository from existing files that are not in source control yet, you need to complete the following steps:

    In the Projects window, select an unversioned project and right-click the project name.
    In the context menu, choose Versioning > Initialize Git Repository (alternatively, in the main menu, choose Team > Git > Initialize).

    Plugins dialog box
 ###   Specify the path to the repository you are going to store your versioned files in the Initialize a Git Repository dialog box or click Browse and browse for the directory required.
    Click OK.

    The Git repository is created. You can open Window > Output > Output to view the IDE's report about the progress of the repository creation under your local working directory.

    Output window

    A .git subfolder is created in your NetBeans project folder, which is your Git repository where all the data of your project snapshots are stored. In other words, an existing NetBeans directory is turned into a Git repository.

All the project files are marked Added in your Working Tree. To view a file status, place the cursor over the file name in the Projects window. The status of the file in the Working Tree displays in green to the right of the slash like shown in the following picture."


I marked a special step with ### 
Follow these instructions two times. 
at ### the path defaults to your project's path
a) confirm --> everything works as described in the following steps
b) choose a different location for your repository
Neither will the files marked as "added" nor will the context menue contain a "Git" menu
Comment 1 Ondrej Vrabec 2011-10-07 19:49:09 UTC
> b) choose a different location for your repository
> Neither will the files marked as "added" nor will the context menue contain a
> "Git" menu
And where did you create the repository, then (relative to the project folder)?
Comment 2 Ondrej Vrabec 2011-10-07 19:54:26 UTC
The repository will be created in the folder specified in the field and git will start versioning all files under that folder (not any other files tree). I guess the git tutorial and F1 topics are a bit misleading.
alyona: can we modify them? I'll instruct you on Monday
Comment 3 AlyonaStashkova 2011-10-10 09:41:49 UTC
Fixed in javahelp  as follows:

1. Git: Initializing
A .git subfolder is created in the folder you specified in step 2 (your NetBeans project folder by default), which is your Git repository where all the data of your project snapshots are stored. Git starts versioning all files in the folder you specified. You can view files being added to the repository from the Output window (Ctrl-4). 

2. Git: Initialize a Git Repository Dialog Box
Notes:

A .git subfolder is created in the folder you specified (your NetBeans project folder by default), which is your Git repository where all the data of your project snapshots are stored. Git starts versioning all files in the folder you specified.

You can view files being added to the repository from the Output window (Ctrl-4).

Will be fixed in the tutorial by FCS as follows:

"A .git subfolder is created in the folder you specified in step 3 above (your NetBeans project folder by default), which is your Git repository where all the data of your project snapshots are stored. Git starts versioning all files in the folder you specified."
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo