You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2019/01/07 23:26:02 UTC

[GitHub] vieiro closed pull request #99: Initial Review of GIT tutorial

vieiro closed pull request #99: Initial Review of GIT tutorial
URL: https://github.com/apache/incubator-netbeans-website/pull/99
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/netbeans.apache.org/src/content/kb/docs/ide/git.asciidoc b/netbeans.apache.org/src/content/kb/docs/ide/git.asciidoc
index 16dd3ed0..fad30d45 100644
--- a/netbeans.apache.org/src/content/kb/docs/ide/git.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/ide/git.asciidoc
@@ -1,4 +1,4 @@
-// 
+//
 //     Licensed to the Apache Software Foundation (ASF) under one
 //     or more contributor license agreements.  See the NOTICE file
 //     distributed with this work for additional information
@@ -6,9 +6,9 @@
 //     to you under the Apache License, Version 2.0 (the
 //     "License"); you may not use this file except in compliance
 //     with the License.  You may obtain a copy of the License at
-// 
+//
 //       http://www.apache.org/licenses/LICENSE-2.0
-// 
+//
 //     Unless required by applicable law or agreed to in writing,
 //     software distributed under the License is distributed on an
 //     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -19,7 +19,7 @@
 
 = Using Git Support in NetBeans IDE
 :jbake-type: tutorial
-:jbake-tags: tutorials 
+:jbake-tags: tutorials
 :jbake-status: published
 :syntax: true
 :source-highlighter: pygments
@@ -33,43 +33,16 @@ The NetBeans IDE provides support for the Git version control client. The IDE's
 Git is a free and open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Every Git clone is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server. Branching and merging are fast and easy to do. Git is used for version control of files, much like tools such as Mercurial, Subversion, CVS, Perforce, etc.
 
 
-=== Contents
-
-image::images/netbeans-stamp-80-74.png[title="Content on this page applies to the NetBeans IDE 7.4 and 8.0"]
-
-* <<initialize,Initializing a Git Repository>>
-* <<clone,Cloning a Git Repository>>
-* <<github,Cloning a Repository from GitHub via SSH Protocol>>
-* <<add,Adding Files to a Git Repository>>
-* <<editing,Editing Files>>
-* <<viewChanges,Viewing Changes in the Source Editor>>
-* <<viewFileStatus,Viewing File Status Information>>
-* <<diff,Comparing File Revisions>>
-* <<revert,Reverting Changes>>
-* <<committing,Committing Sources to a Repository>>
-* <<branch,Working with Branches>>
-* <<branchCreate,Creating a Branch>>
-* <<branchCheckOut,Checking Out a Branch>>
-* <<branchMerge,Merging>>
-* <<branchDelete,Deleting a Branch>>
-* <<remote,Working with Remote Repositories>>
-* <<fetch,Fetching>>
-* <<pull,Pulling>>
-* <<push,Pushing>>
-* <<summary,Summary>>
-* <<seealso,See Also>>
-
-
 == Requirements
 
 *To complete this tutorial, you need the following software and resources.*
 
 |===
-|Software or Resource |Version Required 
+|Software or Resource |Version Required
 
-|link:https://netbeans.org/downloads/index.html[+NetBeans IDE+] |Version 7.4 or 8.0 
+|link:https://netbeans.org/downloads/index.html[+NetBeans IDE+] |Version 10.0
 
-|link:http://www.oracle.com/technetwork/java/javase/downloads/index.html[+Java Development Kit+] (JDK) |Version 7 or 8 
+|link:http://www.oracle.com/technetwork/java/javase/downloads/index.html[+Java Development Kit+] (JDK) |Version 8
 |===
 
 
@@ -135,7 +108,7 @@ To clone a repository from GitHub via the SSH protocol, proceed as follows:
 *Note:* You need to have a GitHub account and be a project member in order to clone via SSH.
 
 1. Choose  ``Team``  >  ``Git``  >  ``Clone``  from the main menu. The Clone Repository wizard displays.
-2. At the Remote Repository page of the Clone Repository wizard, specify the path to the repository required in the Repository URL field, for example,  ``git@github.com:tstupka/koliba.git`` .
+2. At the Remote Repository page of the Clone Repository wizard, specify the path to the repository required in the Repository URL field, for example,  ``git@github.com:apache/incubator-netbeans.git`` .
 3. Verify  ``git``  is specified in the Username text field.
 4. Select the Private/public key option.
 5. (*Skip if using SSH-agent or Pageant for automated SSH access to the Git server.*) Complete the following steps to access the Git server using your private SSH key and a passphrase:
@@ -192,7 +165,7 @@ image::images/clone-completed.png[]
 When adding files to a Git repository, the IDE composes and saves snapshots of your project first in the Index. After you perform the commit, the IDE saves those snapshots in the HEAD. The IDE allows you to choose between the two workflows described in the following table.
 
 |===
-|Workflow Description |Explicitly add new or modified files to the Index and then commit only those that are staged in the Index to the HEAD |Skip adding new or modified files to the Index and commit the required files directly to the HEAD 
+|Workflow Description |Explicitly add new or modified files to the Index and then commit only those that are staged in the Index to the HEAD |Skip adding new or modified files to the Index and commit the required files directly to the HEAD
 
 |Steps to Follow the Workflow  |
 
@@ -207,10 +180,10 @@ This displays the list of files that are already staged.
 
 1. In the Projects window, right-click the file you want to commit.
 2. In the context menu, choose  ``Git``  >  ``Commit`` .
-3. In the Commit dialog box, select the Select the Changes between HEAD and Working Tree (image::images/changes-head-wt.png[]) toggle button. 
+3. In the Commit dialog box, select the Select the Changes between HEAD and Working Tree (image::images/changes-head-wt.png[]) toggle button.
 This displays the list of files that are not staged.
 4. Commit the file(s) as described in the <<committing,Committing Sources to a Repository>> section below.
- 
+
 |===
 
 *Note:* The <<viewFileStatus,status>> of the file in the HEAD displays in green to the left of the slash like shown in the following picture.
@@ -236,11 +209,11 @@ When working with source files in the IDE, there are various UI components at yo
 When you open a versioned file in the IDE's Source Editor, you can view real-time changes occurring to your file as you modify it against the base version from the Git repository. As you work, the IDE uses color coding in the Source Editor's margins to convey the following information:
 
 |===
-|*Blue* (       ) |Indicates lines that have been changed since the earlier revision. 
+|*Blue* (       ) |Indicates lines that have been changed since the earlier revision.
 
-|*Green* (       ) |Indicates lines that have been added since the earlier revision. 
+|*Green* (       ) |Indicates lines that have been added since the earlier revision.
 
-|*Red* (       ) |Indicates lines that have been removed since the earlier revision. 
+|*Red* (       ) |Indicates lines that have been removed since the earlier revision.
 |===
 
 The Source Editor's left margin shows changes occurring on a line-by-line basis. When you modify a given line, changes are immediately shown in the left margin.
@@ -280,66 +253,43 @@ Badges are applied to project, folder, and package nodes and inform you of the s
 The following table displays the color scheme used for badges:
 
 |===
-|UI Component |Description 
+|UI Component |Description
 
-|*Blue Badge* (image::images/blue-badge.png[]) |Indicates the presence of files that have been modified, added or deleted in your working tree. For packages, this badge applies only to the package itself and not its subpackages. For projects or folders, the badge indicates changes within that item, or any of the contained subfolders. 
+|*Blue Badge*
+image:images/blue-badge.png[]
+|Indicates the presence of files that have been modified, added or deleted in your working tree. For packages, this badge applies only to the package itself and not its subpackages. For projects or folders, the badge indicates changes within that item, or any of the contained subfolders.
 
-|*Red Badge* (image::images/red-badge.png[]) |Marks projects, folders or packages that contain _conflicting_ files. For packages, this badge applies only to the package itself and not its subpackages. For projects or folders, the badge indicates conflicts within that item, or any of the contained subfolders. 
+|*Red Badge*
+image:images/red-badge.png[]
+|Marks projects, folders or packages that contain _conflicting_ files. For packages, this badge applies only to the package itself and not its subpackages. For projects or folders, the badge indicates conflicts within that item, or any of the contained subfolders.
 |===
 
 Color coding is applied to file names in order to indicate their current status against the repository:
 
 |===
-|Color |Example |Description 
+|Color |Example |Description
 
-|*No specific color (black)* |image::images/black-text.png[] |Indicates that the file has no changes. 
+|*No specific color (black)* |
+image:images/black-text.png[]
+|Indicates that the file has no changes.
 
-|*Blue* |image::images/blue-text.png[] |Indicates that the file has been locally modified. 
+|*Blue* |
+image:images/blue-text.png[]
+|Indicates that the file has been locally modified.
 
-|*Green* |image::images/green-text.png[] |Indicates that the file has been locally added. 
+|*Green* |
+image:images/green-text.png[]
+|Indicates that the file has been locally added.
 
-|*Red* |image::images/red-text.png[] |Indicates that the file is in a merge conflict. 
+|*Red* |
+image:images/red-text.png[]
+|Indicates that the file is in a merge conflict.
 
-|*Gray* |image::images/gray-text.png[] |Indicates that the file is ignored by Git and will not be included in versioning commands (e.g. Update and Commit). Files cannot be ignored if they are versioned. 
+|*Gray* |
+image:images/gray-text.png[]
+|Indicates that the file is ignored by Git and will not be included in versioning commands (e.g. Update and Commit). Files cannot be ignored if they are versioned.
 |===
 
-
-==== File Status Labels
-
-The IDE displays two status values for a file:
-
-* A status describing differences between the files Working Tree and Index state,
-* A status describing differences between the files Index state and current HEAD commit.
-
-File status labels provide a textual indication of the status of versioned files in the IDE's windows:
-
-|===
-|Status Label |Meaning 
-
-|*-* |Unmodified 
-
-|*A* |Added 
-
-|*U* |Updated but unmerged 
-
-|*M* |Modified 
-
-|*D* |Deleted 
-
-|*I* |Ignored 
-
-|*R* |Renamed 
-|===
-
-By default, the IDE displays status (new, modified, ignored, etc.) and folder information in gray text to the right of files, as they are listed in windows.
-
-image::images/file-labels.png[]
-
-File(s) in merge conflict feature the unmerged status that is generally annotated by red color until the file(s) is not resolved by your explicit action. The status label for unmerged file(s) depends on the scenario (e.g.,  ``A/A``  - unmerged, both added).
-
-File status labels can be toggled on and off by choosing  ``View``  >  ``Show Versioning Labels``  from the main menu.
-
-
 ==== Git Versioning View
 
 The Git Versioning view provides you with a real-time list of all of the changes made to files within a selected folder of your local working tree. It opens by default in the bottom panel of the IDE, listing added, deleted or modified files.
@@ -356,21 +306,35 @@ By default, the Versioning view displays a list of all modified files within the
 The Versioning view toolbar also includes buttons that enable you to invoke the most common Git tasks on all files displayed in the list. The following table lists the Git commands available in the toolbar of the Versioning view:
 
 |===
-|Icon |Name |Function 
+|Icon |Name |Function
 
-|image::images/changes-head-wt.png[] |*Changes between HEAD and Working Tree* |Displays a list of files that are either already staged or only modified/created and not staged yet. 
+|
+image:images/changes-head-wt.png[]
+|*Changes between HEAD and Working Tree* |Displays a list of files that are either already staged or only modified/created and not staged yet.
 
-|image::images/changes-head-index.png[] |*Changes between HEAD and Index* |Displays a list of files that are staged. 
+|
+image:images/changes-head-index.png[]
+|*Changes between HEAD and Index* |Displays a list of files that are staged.
 
-|image::images/changes-index-wt.png[] |*Changes between Index and Working Tree* |Displays files that have differences between their staged and Working Tree states. 
+|
+image:images/changes-index-wt.png[]
+|*Changes between Index and Working Tree* |Displays files that have differences between their staged and Working Tree states.
 
-|image::images/refresh.png[] |*Refresh Statuses* |Refreshes the status of the selected files and folders. Files displayed in the Versioning view can be refreshed to reflect any changes that may have been made externally. 
+|
+image:images/refresh.png[]
+|*Refresh Statuses* |Refreshes the status of the selected files and folders. Files displayed in the Versioning view can be refreshed to reflect any changes that may have been made externally.
 
-|image::images/open-diff.png[] |*Open Diff* |Opens the Diff Viewer providing you with a side-by-side comparison of your local copies and the versions maintained in the repository. 
+|
+image:images/open-diff.png[]
+|*Open Diff* |Opens the Diff Viewer providing you with a side-by-side comparison of your local copies and the versions maintained in the repository.
 
-|image::images/update.png[] |*Revert Modifications* |Displays the <<revertdialog,Revert Modifications>> dialog box. 
+|
+image:images/update.png[]
+|*Revert Modifications* |Displays the <<revertdialog,Revert Modifications>> dialog box.
 
-|image::images/commit-button.png[] |*Commit Changes* |Displays the <<commitdialog,Commit>> dialog box. 
+|
+image:images/commit-button.png[]
+|*Commit Changes* |Displays the <<commitdialog,Commit>> dialog box.
 |===
 
 You can access other Git commands in the Versioning view by selecting a table row that corresponds to a modified file, and choosing a command from the right-click menu:
@@ -403,35 +367,57 @@ The Diff Viewer makes use of the same <<color-coding-table,color coding>> used e
 The Diff Viewer toolbar also includes buttons that enable you to invoke the most common Git tasks on all files displayed in the list. The following table lists the Git commands available in the toolbar of the Diff Viewer:
 
 |===
-|Icon |Name |Function 
+|Icon |Name |Function
 
-|image::images/changes-head-wt.png[] |*Changes between HEAD and Working Tree* |Displays a list of files that are either already staged or only modified/created and not staged yet. 
+|
+image:images/changes-head-wt.png[]
+|*Changes between HEAD and Working Tree* |Displays a list of files that are either already staged or only modified/created and not staged yet.
 
-|image::images/changes-head-index.png[] |*Changes between HEAD and Index* |Displays a list of files that are staged. 
+|
+image:images/changes-head-index.png[]
+|*Changes between HEAD and Index* |Displays a list of files that are staged.
 
-|image::images/changes-index-wt.png[] |*Changes between Index and Working Tree* |Displays files that have differences between their staged and working tree states. 
+|
+image:images/changes-index-wt.png[]
+|*Changes between Index and Working Tree* |Displays files that have differences between their staged and working tree states.
 
-|image::images/nextdiff.png[] |*Go to Next Difference* |Displays next difference in the file. 
+|
+image:images/nextdiff.png[]
+|*Go to Next Difference* |Displays next difference in the file.
 
-|image::images/prevdiff.png[] |*Go to Previous Difference* |Displays previous difference in the file. 
+|
+image:images/prevdiff.png[]
+|*Go to Previous Difference* |Displays previous difference in the file.
 
-|image::images/refresh.png[] |*Refresh Statuses* |Refreshes the status of the selected files and folders. Files displayed in the Versioning window can be refreshed to reflect any changes that may have been made externally. 
+|
+image:images/refresh.png[]
+|*Refresh Statuses* |Refreshes the status of the selected files and folders. Files displayed in the Versioning window can be refreshed to reflect any changes that may have been made externally.
 
-|image::images/update.png[] |*Revert Modifications* |Displays the <<revertdialog,Revert Modifications>> dialog box. 
+|
+image:images/update.png[]
+|*Revert Modifications* |Displays the <<revertdialog,Revert Modifications>> dialog box.
 
-|image::images/commit-button.png[] |*Commit Changes* |Displays the <<commitdialog,Commit>> dialog box. 
+|
+image:images/commit-button.png[]
+|*Commit Changes* |Displays the <<commitdialog,Commit>> dialog box.
 |===
 
 If you are performing a diff on your local copy in the Working Tree, the IDE enables you to make changes directly from within the Diff Viewer. To do so, you can either place your cursor within the right pane of the Diff Viewer and modify your file accordingly, otherwise make use of the inline icons that display adjacent to each highlighted change:
 
 |===
-|Icon |Name |Function 
+|Icon |Name |Function
 
-|image::images/insert.png[] |*Replace* |Inserts the highlighted text into your Working Tree copy. 
+|
+image:images/insert.png[]
+|*Replace* |Inserts the highlighted text into your Working Tree copy.
 
-|image::images/arrow.png[] |*Move All* |Reverts the whole local Working Tree copy. 
+|
+image:images/arrow.png[]
+|*Move All* |Reverts the whole local Working Tree copy.
 
-|image::images/remove.png[] |*Remove* |Removes the highlighted text from the local Working Tree copy. 
+|
+image:images/remove.png[]
+|*Remove* |Removes the highlighted text from the local Working Tree copy.
 |===
 
 
@@ -478,11 +464,13 @@ The  ``Commit``  dialog box contains the following components:
 Two toggle buttons that switch the mode in which the actual commit is to be performed are available here:
 
 |===
-|UI Component |Name |Description 
+|UI Component |Name |Description
 
-|image::images/changes-head-index.png[] |*Changes between HEAD and Index* |Displays a list of files that are staged. 
+|image:images/changes-head-index.png[]
+|*Changes between HEAD and Index* |Displays a list of files that are staged.
 
-|image::images/changes-head-wt.png[] |*Changes between HEAD and Working Tree* |Displays a list of files that are either already staged or only modified/created and not staged yet. 
+|image:images/changes-head-wt.png[]
+|*Changes between HEAD and Working Tree* |Displays a list of files that are either already staged or only modified/created and not staged yet.
 |===
 
 *Note*: To specify here whether to exclude individual files from the commit, either deselect the checkbox in the first column called  ``Commit``  or right-click a file row in the  ``Commit Action``  column and choose  ``Exclude from commit``  from the pop-up menu. To display the Diff Viewer here, right-click a file row in the  ``Commit Action``  column and choose  ``Diff``  from the pop-up menu.
@@ -494,7 +482,7 @@ Two toggle buttons that switch the mode in which the actual commit is to be perf
 3. Type in a commit message in the  ``Commit Message``  text area. Alternatively, you can do any of the following:
 * click the  ``Recent Messages``  ( image::images/recent-msgs.png[] ) icon located in the upper right corner to view and select from a list of messages that you have previously used,
 * click the  ``Load Template``  (image::images/msg-template.png[]) icon located in the upper right corner to select a message template.
-4. After specifying actions for individual files, click  ``Commit`` . 
+4. After specifying actions for individual files, click  ``Commit`` .
 The IDE executes the commit and stores your snapshots to the repository. The IDE's status bar, located in the bottom right of the interface, displays as the commit action takes place. Upon a successful commit, versioning badges disappear in the  ``Projects`` ,  ``Files``  and  ``Favorites``  windows, and the color coding of committed files returns to black.
 
 
@@ -544,7 +532,7 @@ If you need to edit files on a branch that already exists, you can check out the
 
 To check out a revision, perform the following:
 
-1. Choose Team > Checkout > Checkout Revision from the main menu. 
+1. Choose Team > Checkout > Checkout Revision from the main menu.
 The Checkout Selected Revision dialog box displays.
 
 [.feature]
@@ -566,7 +554,7 @@ Files in the Working Tree and in the Index are updated to match the version in t
 
 The IDE supports context-sensitive checkout of the file(s), folder(s), or project(s) currently selected in the IDE. To check out some files (not a branch) from the Index, complete the following steps:
 
-1. Choose Team > Checkout > Checkout Files from the main menu. 
+1. Choose Team > Checkout > Checkout Files from the main menu.
 The Checkout Selected Paths dialog box displays.
 
 [.feature]


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists