You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by gi...@apache.org on 2019/01/23 21:30:03 UTC
[incubator-netbeans-website] branch asf-site updated: Automated
site publishing by Jenkins build 451
This is an automated email from the ASF dual-hosted git repository.
git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-netbeans-website.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 823c6a0 Automated site publishing by Jenkins build 451
823c6a0 is described below
commit 823c6a0d616fa47ea129464096bf3d6ec8b35b13
Author: jenkins <bu...@apache.org>
AuthorDate: Wed Jan 23 21:30:01 2019 +0000
Automated site publishing by Jenkins build 451
---
content/kb/docs/ide/git.html | 143 ++++++++++++++++++++++++++-----------------
1 file changed, 88 insertions(+), 55 deletions(-)
diff --git a/content/kb/docs/ide/git.html b/content/kb/docs/ide/git.html
index 0e24e57..d28247d 100644
--- a/content/kb/docs/ide/git.html
+++ b/content/kb/docs/ide/git.html
@@ -5,7 +5,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
- <title>Using Git Support in NetBeans IDE</title>
+ <title>Using Git in NetBeans IDE</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Using Git Support in NetBeans IDE - Apache NetBeans">
<meta name="author" content="Apache NetBeans">
@@ -78,26 +78,45 @@
</section>
<div class='grid-container main-content tutorial'>
- <h1 class="sect0">Using Git Support in NetBeans IDE</h1>
+ <h1 class="sect0">Using Git in NetBeans IDE</h1>
<div id="toc" class="toc">
<div id="toctitle"></div>
<ul class="sectlevel1">
-<li><a href="#_using_git_support_in_netbeans_ide">Using Git Support in NetBeans IDE</a>
-<ul class="sectlevel2">
<li><a href="#_initializing_a_git_repository">Initializing a Git Repository</a></li>
-<li><a href="#_cloning_a_git_repository">Cloning a Git Repository</a></li>
+<li><a href="#_cloning_a_git_repository">Cloning a Git Repository</a>
+<ul class="sectlevel2">
+<li><a href="#_cloning_a_repository_from_github_via_ssh_protocol">Cloning a Repository from GitHub via SSH protocol</a></li>
<li><a href="#_adding_files_to_a_git_repository">Adding Files to a Git Repository</a></li>
-<li><a href="#_editing_files">Editing Files</a></li>
+</ul>
+</li>
+<li><a href="#_editing_files">Editing Files</a>
+<ul class="sectlevel2">
+<li><a href="#_viewing_changes_in_the_source_editor">Viewing Changes in the Source Editor</a></li>
+<li><a href="#_viewing_file_status_information">Viewing File Status Information</a></li>
+<li><a href="#_comparing_file_revisions">Comparing File Revisions</a></li>
+<li><a href="#_reverting_changes">Reverting Changes</a></li>
+</ul>
+</li>
<li><a href="#_committing_sources_to_a_repository">Committing Sources to a Repository</a></li>
-<li><a href="#_working_with_branches">Working with Branches</a></li>
-<li><a href="#_working_with_remote_repositories">Working with Remote Repositories</a></li>
-<li><a href="#_summary">Summary</a></li>
+<li><a href="#_working_with_branches">Working with Branches</a>
+<ul class="sectlevel2">
+<li><a href="#_creating_a_branch">Creating a Branch</a></li>
+<li><a href="#_checking_out">Checking Out</a></li>
+<li><a href="#_merging">Merging</a></li>
+<li><a href="#_deleting_a_branch">Deleting a Branch</a></li>
</ul>
</li>
+<li><a href="#_working_with_remote_repositories">Working with Remote Repositories</a>
+<ul class="sectlevel2">
+<li><a href="#_fetching">Fetching</a></li>
+<li><a href="#_pulling">Pulling</a></li>
+<li><a href="#_pushing">Pushing</a></li>
+</ul>
+</li>
+<li><a href="#_summary">Summary</a></li>
</ul>
</div>
-<div class="sect1">
-<h2 id="_using_git_support_in_netbeans_ide">Using Git Support in NetBeans IDE</h2>
+<div id="preamble">
<div class="sectionbody">
<div class="paragraph">
<p>The NetBeans IDE provides support for the Git version control client. The IDE’s Git support allows you to perform versioning tasks directly from your project within the IDE. This document demonstrates how to perform basic versioning tasks in the IDE by guiding you through the standard workflow when using versioning software.</p>
@@ -105,8 +124,11 @@
<div class="paragraph">
<p>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.</p>
</div>
-<div class="sect2">
-<h3 id="_initializing_a_git_repository">Initializing a Git Repository</h3>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_initializing_a_git_repository">Initializing a Git Repository</h2>
+<div class="sectionbody">
<div class="paragraph">
<p>To initialize a Git repository from existing files that are not in source control yet, you need to complete the following steps:</p>
</div>
@@ -160,8 +182,10 @@ You can open <code>Window</code> > <code>Output</code> > <code>Output
<p>After you initialized the Git repository, you either <a href="#add">add</a> files or directly <a href="#committing">commit</a> them to the Git repository.</p>
</div>
</div>
-<div class="sect2">
-<h3 id="_cloning_a_git_repository">Cloning a Git Repository</h3>
+</div>
+<div class="sect1">
+<h2 id="_cloning_a_git_repository">Cloning a Git Repository</h2>
+<div class="sectionbody">
<div class="paragraph">
<p>To get a copy of an already existing Git repository, you need to clone it. Make sure you know the Git repository URL before starting the Clone Repository wizard in the IDE.</p>
</div>
@@ -226,8 +250,8 @@ After a Git repository is cloned, the metadata <code>.git</code> folder is cre
</li>
</ol>
</div>
-<div class="sect3">
-<h4 id="_cloning_a_repository_from_github_via_ssh_protocol">Cloning a Repository from GitHub via SSH protocol</h4>
+<div class="sect2">
+<h3 id="_cloning_a_repository_from_github_via_ssh_protocol">Cloning a Repository from GitHub via SSH protocol</h3>
<div class="paragraph">
<p>To clone a repository from GitHub via the SSH protocol, proceed as follows:</p>
</div>
@@ -383,7 +407,6 @@ After the repository is cloned, the Clone Completed message displays.</p>
</ol>
</div>
</div>
-</div>
<div class="sect2">
<h3 id="_adding_files_to_a_git_repository">Adding Files to a Git Repository</h3>
<div class="paragraph">
@@ -444,8 +467,11 @@ The <a href="#viewFileStatus">status</a> of the file in the HEAD displays in gre
<p>The action works recursively if invoked on folders while respecting the NetBeans IDE flat folder content structure.</p>
</div>
</div>
-<div class="sect2">
-<h3 id="_editing_files">Editing Files</h3>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_editing_files">Editing Files</h2>
+<div class="sectionbody">
<div class="paragraph">
<p>Once you have a Git versioned project opened in the IDE, you can begin making changes to sources. As with any project opened in NetBeans IDE, you can open files in the Source Editor by double-clicking on their nodes, as they appear in the IDE’s windows (e.g., Projects (Ctrl-1), Files (Ctrl-2), Favorites (Ctrl-3) windows).</p>
</div>
@@ -465,8 +491,8 @@ The <a href="#viewFileStatus">status</a> of the file in the HEAD displays in gre
</li>
</ul>
</div>
-<div class="sect3">
-<h4 id="_viewing_changes_in_the_source_editor">Viewing Changes in the Source Editor</h4>
+<div class="sect2">
+<h3 id="_viewing_changes_in_the_source_editor">Viewing Changes in the Source Editor</h3>
<div class="paragraph">
<p>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:</p>
</div>
@@ -534,8 +560,8 @@ You can click on a color grouping in the margin to call versioning commands. For
</div>
</div>
</div>
-<div class="sect3">
-<h4 id="_viewing_file_status_information">Viewing File Status Information</h4>
+<div class="sect2">
+<h3 id="_viewing_file_status_information">Viewing File Status Information</h3>
<div class="paragraph">
<p>When you are working in the Projects (Ctrl-1), Files (Ctrl-2), Favorites (Ctrl-3), or Versioning views, the IDE provides several visual features that aid in viewing status information about your files. In the example below, notice how the badge (e.g. image::images/blue-badge.png[]), color of the file name, and adjacent status label, all coincide with each other to provide you with a simple but effective way to keep track of versioning information on your files:</p>
</div>
@@ -560,8 +586,8 @@ You can click on a color grouping in the margin to call versioning commands. For
</li>
</ul>
</div>
-<div class="sect4">
-<h5 id="_badges_and_color_coding">Badges and Color Coding</h5>
+<div class="sect3">
+<h4 id="_badges_and_color_coding">Badges and Color Coding</h4>
<div class="paragraph">
<p>Badges are applied to project, folder, and package nodes and inform you of the status of files contained within that node:</p>
</div>
@@ -637,8 +663,8 @@ You can click on a color grouping in the margin to call versioning commands. For
</tbody>
</table>
</div>
-<div class="sect4">
-<h5 id="_git_versioning_view">Git Versioning View</h5>
+<div class="sect3">
+<h4 id="_git_versioning_view">Git Versioning View</h4>
<div class="paragraph">
<p>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.</p>
</div>
@@ -725,8 +751,8 @@ You can click on a color grouping in the margin to call versioning commands. For
</div>
</div>
</div>
-<div class="sect3">
-<h4 id="_comparing_file_revisions">Comparing File Revisions</h4>
+<div class="sect2">
+<h3 id="_comparing_file_revisions">Comparing File Revisions</h3>
<div class="paragraph">
<p>Comparing file versions is a common task when working with versioned projects. The IDE enables you to compare revisions by using the Diff command:</p>
</div>
@@ -871,8 +897,8 @@ Other revisions can be selected from the <code>Diff</code> and <code>to</code
</tbody>
</table>
</div>
-<div class="sect3">
-<h4 id="_reverting_changes">Reverting Changes</h4>
+<div class="sect2">
+<h3 id="_reverting_changes">Reverting Changes</h3>
<div class="paragraph">
<p>To throw away local changes made to selected files in your Working Tree and replace those files with the ones in the Index or HEAD:</p>
</div>
@@ -907,8 +933,10 @@ The <code>Revert Modifications</code> dialog box displays.</p>
</div>
</div>
</div>
-<div class="sect2">
-<h3 id="_committing_sources_to_a_repository">Committing Sources to a Repository</h3>
+</div>
+<div class="sect1">
+<h2 id="_committing_sources_to_a_repository">Committing Sources to a Repository</h2>
+<div class="sectionbody">
<div class="paragraph">
<p>To commit files to the Git repository:</p>
</div>
@@ -1035,8 +1063,10 @@ The IDE executes the commit and stores your snapshots to the repository. The IDE
</ol>
</div>
</div>
-<div class="sect2">
-<h3 id="_working_with_branches">Working with Branches</h3>
+</div>
+<div class="sect1">
+<h2 id="_working_with_branches">Working with Branches</h2>
+<div class="sectionbody">
<div class="paragraph">
<p>The IDE’s Git support enables you to maintain different versions of an entire code base using branches.</p>
</div>
@@ -1059,8 +1089,8 @@ The IDE executes the commit and stores your snapshots to the repository. The IDE
</li>
</ul>
</div>
-<div class="sect3">
-<h4 id="_creating_a_branch">Creating a Branch</h4>
+<div class="sect2">
+<h3 id="_creating_a_branch">Creating a Branch</h3>
<div class="paragraph">
<p>To create a local branch, if you want to work on a separate version of your file system for stabilization or experimentation purposes without disturbing the main trunk, complete the following steps:</p>
</div>
@@ -1125,8 +1155,8 @@ The branch is added to the <code>Branches/Local</code> folder of the Git repos
</div>
</div>
</div>
-<div class="sect3">
-<h4 id="_checking_out">Checking Out</h4>
+<div class="sect2">
+<h3 id="_checking_out">Checking Out</h3>
<div class="paragraph">
<p>If you need to edit files on a branch that already exists, you can check out the branch to copy the files to your Working Tree.</p>
</div>
@@ -1236,8 +1266,8 @@ If selected, the Index is updated with the state in the selected revision prior
</ol>
</div>
</div>
-<div class="sect3">
-<h4 id="_merging">Merging</h4>
+<div class="sect2">
+<h3 id="_merging">Merging</h3>
<div class="paragraph">
<p>To port modifications from a repository revision to the Working Tree, do as follows:</p>
</div>
@@ -1297,8 +1327,8 @@ After merging you must still <a href="#committing">commit</a> the changes in ord
</table>
</div>
</div>
-<div class="sect3">
-<h4 id="_deleting_a_branch">Deleting a Branch</h4>
+<div class="sect2">
+<h3 id="_deleting_a_branch">Deleting a Branch</h3>
<div class="paragraph">
<p>To delete an unnecessary local branch, complete the following steps:</p>
</div>
@@ -1337,8 +1367,10 @@ The branch is removed from the local repository as well as the Git Repository Br
</div>
</div>
</div>
-<div class="sect2">
-<h3 id="_working_with_remote_repositories">Working with Remote Repositories</h3>
+</div>
+<div class="sect1">
+<h2 id="_working_with_remote_repositories">Working with Remote Repositories</h2>
+<div class="sectionbody">
<div class="paragraph">
<p>When you work with other developers you need to share your work, which involves fetching, pushing, and pulling data to and from remote repositories hosted on the Internet or network.</p>
</div>
@@ -1355,8 +1387,8 @@ The branch is removed from the local repository as well as the Git Repository Br
</li>
</ul>
</div>
-<div class="sect3">
-<h4 id="_fetching">Fetching</h4>
+<div class="sect2">
+<h3 id="_fetching">Fetching</h3>
<div class="paragraph">
<p>Fetching gets the changes from the original remote repository that you do not have yet. It never changes any of your local branches. Fetching gets all the branches from remote repositories, which you can merge into your branch or just inspect at any time.</p>
</div>
@@ -1393,8 +1425,8 @@ Next the fetched updates can be merged into a local branch.</p>
</ol>
</div>
</div>
-<div class="sect3">
-<h4 id="_pulling">Pulling</h4>
+<div class="sect2">
+<h3 id="_pulling">Pulling</h3>
<div class="paragraph">
<p>When pulling some updates from a remote Git repository, the changes are fetched from it and merged into the current HEAD of your local repository.
To perform pulling, complete the following steps:</p>
@@ -1428,8 +1460,8 @@ Your local repository is synchronized with the origin repository.</p>
</ol>
</div>
</div>
-<div class="sect3">
-<h4 id="_pushing">Pushing</h4>
+<div class="sect2">
+<h3 id="_pushing">Pushing</h3>
<div class="paragraph">
<p>To contribute changes from your local Git repository into a public Git repository, perform the following steps:</p>
</div>
@@ -1478,14 +1510,15 @@ The specified remote repository branch is updated with the latest state of your
</div>
</div>
</div>
-<div class="sect2">
-<h3 id="_summary">Summary</h3>
+</div>
+<div class="sect1">
+<h2 id="_summary">Summary</h2>
+<div class="sectionbody">
<div class="paragraph">
<p>This tutorial showed how to perform basic versioning tasks in the IDE by guiding you through the standard workflow when using the IDE’s GIT support. It demonstrated how to set up a versioned project and perform basic tasks on versioned files while introducing you to some of the GIT specific features included in the IDE.</p>
</div>
</div>
</div>
-</div>
<section class='tools'>
<ul class="menu align-center">
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists