Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Orion/Documentation/User Guide/Reference/Git Status page"

m
Line 3: Line 3:
  
  
[[Image:Orion-status-page-overview.png]]
+
[[Image:Orion-status-page-overview.png|Git status page]]
  
 
== Types of changes ==
 
== Types of changes ==
Line 9: Line 9:
 
Excluding the conflicting cases, there are three types of changes: adding, changing and deleting. The types of changes are indicated by icons on the left of the files.
 
Excluding the conflicting cases, there are three types of changes: adding, changing and deleting. The types of changes are indicated by icons on the left of the files.
  
[[Image:Orion-status-page-change-types.png]]
+
[[Image:Orion-status-page-change-types.png|Change type icons]]
  
 
== Comparing changes ==
 
== Comparing changes ==
Line 19: Line 19:
 
Before you can commit a file in Git, it must be added to your local index. This process is called <i>staging</i>, or <i>Git add</i>.
 
Before you can commit a file in Git, it must be added to your local index. This process is called <i>staging</i>, or <i>Git add</i>.
  
[[Image:Orion-status-page-stage-action.png]]
+
[[Image:Orion-status-page-stage-action.png|Stage button]]
  
 
Click on the action to stage the change. The file will be moved to the <b>Staged</b> area.
 
Click on the action to stage the change. The file will be moved to the <b>Staged</b> area.
  
[[Image:Orion-status-page-staged-change.png]]
+
[[Image:Orion-status-page-staged-change.png|Staged area]]
  
 
From the top-right corner of the unstaged area, you can also click on the <b>stage all</b> action to stage all selected changes.
 
From the top-right corner of the unstaged area, you can also click on the <b>stage all</b> action to stage all selected changes.
Line 31: Line 31:
 
Let's say you have made a change in your working copy that you want to discard. You can discard a change by performing a checkout of the file contents from your local index.
 
Let's say you have made a change in your working copy that you want to discard. You can discard a change by performing a checkout of the file contents from your local index.
  
[[Image:Orion-status-page-checkout-action.png]]
+
[[Image:Orion-status-page-checkout-action.png|Checkout button]]
  
 
Clicking on the action pops up the confirmation dialog. Click <b>OK</b> to restore the change from the index or <b>Cancel</b> to cancel the action.
 
Clicking on the action pops up the confirmation dialog. Click <b>OK</b> to restore the change from the index or <b>Cancel</b> to cancel the action.
  
[[Image:Orion-status-page-checkout-confirm.png]]
+
[[Image:Orion-status-page-checkout-confirm.png|Confirmation dialog]]
  
 
== Reverting a group of unstaged changes==
 
== Reverting a group of unstaged changes==
Line 41: Line 41:
 
You can also discard a group of changes. From the top-right corner of the unstaged area, you can click on the <b>Checkout</b> action to check out all selected changes.  
 
You can also discard a group of changes. From the top-right corner of the unstaged area, you can click on the <b>Checkout</b> action to check out all selected changes.  
  
[[Image:Orion-status-page-checkout_group.png]]
+
[[Image:Orion-status-page-checkout_group.png|Checkout selected button]]
  
 
== Resetting all changes from the index==
 
== Resetting all changes from the index==
Line 47: Line 47:
 
You can also reset all the unstaged and staged changes by clicking on the <b>Reset</b> from the page action.
 
You can also reset all the unstaged and staged changes by clicking on the <b>Reset</b> from the page action.
  
[[Image:Orion-status-page-reset-action.png]]
+
[[Image:Orion-status-page-reset-action.png|Reset button]]
  
 
A confirmation dialog pops up when you click on the action. Click <b>OK</b> to reset the changes from the index or <b>Cancel</b> to cancel the action.
 
A confirmation dialog pops up when you click on the action. Click <b>OK</b> to reset the changes from the index or <b>Cancel</b> to cancel the action.
  
[[Image:Orion-status-page-reset-confirm.png]]
+
[[Image:Orion-status-page-reset-confirm.png|Reset confirmation button]]
  
 
== Unstaging changes ==
 
== Unstaging changes ==
Line 57: Line 57:
 
If you decide you don't want to commit a change, but want to continue working on it, you can remove it from your index by <i>unstaging</i> it. From the top-right corner of the staged area, you can click on the <b>unstage all</b> action to unstage all selected changes or just unstage changes one by one.
 
If you decide you don't want to commit a change, but want to continue working on it, you can remove it from your index by <i>unstaging</i> it. From the top-right corner of the staged area, you can click on the <b>unstage all</b> action to unstage all selected changes or just unstage changes one by one.
  
[[Image:Orion-status-page-unstage-action.png]]
+
[[Image:Orion-status-page-unstage-action.png|Unstage button]]
  
 
== Committing changes ==
 
== Committing changes ==
Line 63: Line 63:
 
Once changes are staged, you can use actions in the commit area to commit all staged changes. The <b>commit</b> button is disabled if there is no message in the <b>commit message</b>, so you have to input the message before you commit the changes. The <b>Amend</b> check-box is used to amend the last commit.
 
Once changes are staged, you can use actions in the commit area to commit all staged changes. The <b>commit</b> button is disabled if there is no message in the <b>commit message</b>, so you have to input the message before you commit the changes. The <b>Amend</b> check-box is used to amend the last commit.
  
[[Image:Orion-status-page-commit-action.png]]
+
[[Image:Orion-status-page-commit-action.png|Commit area]]
  
 
== Recent commits area ==
 
== Recent commits area ==
Line 69: Line 69:
 
There are 2 <b>recent commits</b> areas in the git status page. The top one represents the recent commits from the local branch while the bottom one represents the remote tracking branch. Both areas have 5 most recent commits respectively. You can perform <b>fetch, merge and push</b> actions here, which are also available in the [[Orion/Documentation/User Guide/Reference/Git Log page|Log page]]. Clicking on the <b>Complete log</b> navigates to the [[Orion/Documentation/User Guide/Reference/Git Log page|Log page]] with local or remote mode. There you can refer to the details of the commits.  
 
There are 2 <b>recent commits</b> areas in the git status page. The top one represents the recent commits from the local branch while the bottom one represents the remote tracking branch. Both areas have 5 most recent commits respectively. You can perform <b>fetch, merge and push</b> actions here, which are also available in the [[Orion/Documentation/User Guide/Reference/Git Log page|Log page]]. Clicking on the <b>Complete log</b> navigates to the [[Orion/Documentation/User Guide/Reference/Git Log page|Log page]] with local or remote mode. There you can refer to the details of the commits.  
  
[[Image:Orion-status-page-mini-logs.png]]
+
[[Image:Orion-status-page-mini-logs.png|Status page logs]]
  
 
=== Fetch from remote branch ===
 
=== Fetch from remote branch ===
Line 77: Line 77:
 
Click on the second action icon <b>Merge</b> from the <b>remote tracking branch</b> area to merge all the recent commits to the local branch.  
 
Click on the second action icon <b>Merge</b> from the <b>remote tracking branch</b> area to merge all the recent commits to the local branch.  
  
[[Image:Orion-status-page-mini-logs-merged.png]]
+
[[Image:Orion-status-page-mini-logs-merged.png|Merged log]]
  
 
=== Push to remote branch ===
 
=== Push to remote branch ===
 
Once commits from remote branch are merged, click on the action icon <b>Push</b> from the <b>local branch</b> area to push all the recent commits to the remote tracking branch. The recent commits on the 2 areas are synchronized as shown below.
 
Once commits from remote branch are merged, click on the action icon <b>Push</b> from the <b>local branch</b> area to push all the recent commits to the remote tracking branch. The recent commits on the 2 areas are synchronized as shown below.
  
[[Image:Orion-status-page-mini-logs-pushed.png]]
+
[[Image:Orion-status-page-mini-logs-pushed.png|Push button]]

Revision as of 16:08, 13 March 2012

Git Status page

The Git Status page provides a summary of the current state of a Git clone associated with your Orion account. This page shows changes in your working tree, staged changes that are ready to commit, and a summary of the current contents of the local and remote tracking branches. The title area indicates the repository and branch name you are currently viewing. Commands available on staged or unstaged files are shown to the right of each file when you hover over it.


Git status page

Types of changes

Excluding the conflicting cases, there are three types of changes: adding, changing and deleting. The types of changes are indicated by icons on the left of the files.

Change type icons

Comparing changes

Click any staged or unstaged change to open a comparison between the working copy and the state of that file in the most recent commit. You can also open a separate Compare page by clicking the Side by side compare button to the right of the file name. The compare page allows you to merge changes or perform further edits on your uncommitted changes.

Staging changes

Before you can commit a file in Git, it must be added to your local index. This process is called staging, or Git add.

Stage button

Click on the action to stage the change. The file will be moved to the Staged area.

Staged area

From the top-right corner of the unstaged area, you can also click on the stage all action to stage all selected changes.

Reverting an unstaged change

Let's say you have made a change in your working copy that you want to discard. You can discard a change by performing a checkout of the file contents from your local index.

Checkout button

Clicking on the action pops up the confirmation dialog. Click OK to restore the change from the index or Cancel to cancel the action.

Confirmation dialog

Reverting a group of unstaged changes

You can also discard a group of changes. From the top-right corner of the unstaged area, you can click on the Checkout action to check out all selected changes.

Checkout selected button

Resetting all changes from the index

You can also reset all the unstaged and staged changes by clicking on the Reset from the page action.

Reset button

A confirmation dialog pops up when you click on the action. Click OK to reset the changes from the index or Cancel to cancel the action.

Reset confirmation button

Unstaging changes

If you decide you don't want to commit a change, but want to continue working on it, you can remove it from your index by unstaging it. From the top-right corner of the staged area, you can click on the unstage all action to unstage all selected changes or just unstage changes one by one.

Unstage button

Committing changes

Once changes are staged, you can use actions in the commit area to commit all staged changes. The commit button is disabled if there is no message in the commit message, so you have to input the message before you commit the changes. The Amend check-box is used to amend the last commit.

Commit area

Recent commits area

There are 2 recent commits areas in the git status page. The top one represents the recent commits from the local branch while the bottom one represents the remote tracking branch. Both areas have 5 most recent commits respectively. You can perform fetch, merge and push actions here, which are also available in the Log page. Clicking on the Complete log navigates to the Log page with local or remote mode. There you can refer to the details of the commits.

Status page logs

Fetch from remote branch

Click on the first action icon Fetch from the remote tracking branch area to fetch all the recent commits. All the incoming changes are highlighted as shown above.

Merge from remote branch

Click on the second action icon Merge from the remote tracking branch area to merge all the recent commits to the local branch.

Merged log

Push to remote branch

Once commits from remote branch are merged, click on the action icon Push from the local branch area to push all the recent commits to the remote tracking branch. The recent commits on the 2 areas are synchronized as shown below.

Push button

Back to the top