Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Orion/Documentation/User Guide/Reference/Git Status page"
(→Reverting an unstaged change) |
(→Git Status page) |
||
Line 25: | Line 25: | ||
== Staging changes == | == Staging changes == | ||
− | 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>. You can stage one file at a time using the stage icon adjacent to the file. |
+ | |||
+ | You can also stage one or more changes by selecting a group of changes (with Ctrl+Click or Shift+Click) and then clicking the <b>Stage</b> button at the top of the unstaged list. | ||
[[Image:Orion-status-page-stage-action.png|Stage button]] | [[Image:Orion-status-page-stage-action.png|Stage button]] | ||
Line 42: | Line 44: | ||
[[Image:Orion-status-page-checkout-confirm.png|Confirmation dialog]] | [[Image:Orion-status-page-checkout-confirm.png|Confirmation dialog]] | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Resetting all changes from the index== | == Resetting all changes from the index== | ||
− | You can | + | You can reset all the unstaged and staged changes by clicking on the <b>Reset</b> button in the main toolbar. |
[[Image:Orion-status-page-reset-action.png|Reset button]] | [[Image:Orion-status-page-reset-action.png|Reset button]] | ||
Line 61: | Line 57: | ||
== Unstaging changes == | == 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 <i>unstaging</i> it. | + | 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. You can either unstage changes one by one with the icon, or select changes and use the <b>Unstage</b> button to unstage a group of changes. |
[[Image:Orion-status-page-unstage-action.png|Unstage button]] | [[Image:Orion-status-page-unstage-action.png|Unstage button]] | ||
Line 67: | Line 63: | ||
== Committing changes == | == Committing changes == | ||
− | Once changes are staged, you can use | + | Once changes are staged, you can use the <b>Commit</b> button to commit the changes. You will be prompted for a commit message. The <b>Amend</b> check-box is used to amend the last commit. Once you've provided a commit message, you can use the <b>Enter</b> key or <b>Submit</b> button to finish the commit. |
[[Image:Orion-status-page-commit-action.png|Commit area]] | [[Image:Orion-status-page-commit-action.png|Commit area]] | ||
Line 73: | Line 69: | ||
== Recent commits area == | == Recent commits area == | ||
− | + | The git status page also shows the recent commits from your local branch. 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|Status page logs]] | [[Image:Orion-status-page-mini-logs.png|Status page logs]] |
Revision as of 11:35, 16 October 2012
Contents
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 commits in the active branch.
Types of changes
Typically, there are three types of changes: adding, changing and deleting. The types of changes are indicated by icons on the left of the files.
Files with conflicting changes will have additional annotations.
Comparing changes
To view the code diff for a particular change, you can use the twistie icon next at the left of the change to open the diff. From there, you can traverse the changes using the commands above the diff. You can also open a separate Compare page by clicking the Side by side compare button. The compare page allows you to merge changes or perform further edits on your uncommitted changes.
You can also use the expand and collapse buttons at the top of the Unstaged and Staged sections to open and close all of the diffs in the list at once.
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. You can stage one file at a time using the stage icon adjacent to the file.
You can also stage one or more changes by selecting a group of changes (with Ctrl+Click or Shift+Click) and then clicking the Stage button at the top of the unstaged list.
When the changes are staged, the files will be moved to the Staged area.
Reverting an unstaged change
Suppose you have made a change in your working copy that you want to discard. You can discard a change by selecting one or more files that you wish to revert and performing a checkout of the file contents from your local index.
Clicking on the action pops up the confirmation dialog. Click OK to restore the change from the index or Cancel to cancel the action.
Resetting all changes from the index
You can reset all the unstaged and staged changes by clicking on the Reset button in the main toolbar.
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.
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. You can either unstage changes one by one with the icon, or select changes and use the Unstage button to unstage a group of changes.
Committing changes
Once changes are staged, you can use the Commit button to commit the changes. You will be prompted for a commit message. The Amend check-box is used to amend the last commit. Once you've provided a commit message, you can use the Enter key or Submit button to finish the commit.
Recent commits area
The git status page also shows the recent commits from your local branch. 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.
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.
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.