forked from qt-creator/qt-creator
Doc: new Git commands
Actions on Commits, Fixup Last Commit, Interactive Rebase, Rename branch, Push to remote repository, and Push to Gerrit Change-Id: I434f836944d9fa86fad73f0256b330aad9532ed0 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Petar Perisin <petar.perisin@gmail.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
This commit is contained in:
BIN
doc/images/creator-git-commit-actions.png
Normal file
BIN
doc/images/creator-git-commit-actions.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 54 KiB |
@@ -262,12 +262,12 @@
|
|||||||
\list
|
\list
|
||||||
|
|
||||||
\li \gui Git > \gui {Current File} > \gui{Undo Unstaged Changes} reverts
|
\li \gui Git > \gui {Current File} > \gui{Undo Unstaged Changes} reverts
|
||||||
all changes and resets the working directory to the state of the
|
all changes and resets the current file to the state of the
|
||||||
index.
|
index.
|
||||||
|
|
||||||
\li \gui Git > \gui {Current File} > \gui {Undo Uncommitted Changes}
|
\li \gui Git > \gui {Current File} > \gui {Undo Uncommitted Changes}
|
||||||
reverts all changes, discarding the
|
reverts all changes, discarding the
|
||||||
index. This returns your working copy to the state it was in right
|
index. This returns the current file to the state it was in right
|
||||||
after the last commit.
|
after the last commit.
|
||||||
|
|
||||||
\li \gui Git > \gui {Local Repository} > \gui Reset opens a dialog
|
\li \gui Git > \gui {Local Repository} > \gui Reset opens a dialog
|
||||||
@@ -386,14 +386,20 @@
|
|||||||
select \gui Tools > \gui Git > \gui {Local Repository} > \gui Clean to clean
|
select \gui Tools > \gui Git > \gui {Local Repository} > \gui Clean to clean
|
||||||
the repository.
|
the repository.
|
||||||
|
|
||||||
To show commits, select \gui Tools > \gui Git > \gui {Show Commit} and
|
|
||||||
select a commit to view. Enter the SHA-1 or reference of the commit in the
|
|
||||||
\gui Change field.
|
|
||||||
|
|
||||||
To apply latest changes to the last commit, select \gui Tools > \gui Git >
|
To apply latest changes to the last commit, select \gui Tools > \gui Git >
|
||||||
\gui {Local Repository} > \gui {Amend Last Commit}. You can also edit the
|
\gui {Local Repository} > \gui {Amend Last Commit}. You can also edit the
|
||||||
commit message.
|
commit message.
|
||||||
|
|
||||||
|
To amend an earlier comment in a series of related commits, select
|
||||||
|
\gui Tools > \gui Git > \gui {Local Repository} >
|
||||||
|
\gui {Fixup Previous Commit}. This operation is done using interactive
|
||||||
|
rebase. In case of conflicts, a merge tool is suggested.
|
||||||
|
|
||||||
|
To change a series of commits in the local repository, select \gui Tools >
|
||||||
|
\gui Git > \gui {Local Repository} > \gui {Interactive Rebase}. You can
|
||||||
|
reorder or discard commits, squash them into a single commit, or edit the
|
||||||
|
commit messages.
|
||||||
|
|
||||||
The following sections describe how to manage local and remote branches,
|
The following sections describe how to manage local and remote branches,
|
||||||
apply patches, and use stashes.
|
apply patches, and use stashes.
|
||||||
|
|
||||||
@@ -420,6 +426,9 @@
|
|||||||
\row
|
\row
|
||||||
\li \gui{Remove}
|
\li \gui{Remove}
|
||||||
\li Remove a local branch. You cannot delete remote branches.
|
\li Remove a local branch. You cannot delete remote branches.
|
||||||
|
\row
|
||||||
|
\li \gui Rename
|
||||||
|
\li Rename a local branch.
|
||||||
\row
|
\row
|
||||||
\li \gui{Checkout}
|
\li \gui{Checkout}
|
||||||
\li Check out the selected branch and make it current. You can stash
|
\li Check out the selected branch and make it current. You can stash
|
||||||
@@ -463,13 +472,21 @@
|
|||||||
display or delete them, select \gui Stashes.
|
display or delete them, select \gui Stashes.
|
||||||
|
|
||||||
To save a snapshot of your current work under a name for later reference,
|
To save a snapshot of your current work under a name for later reference,
|
||||||
select \gui {Stash Snapshot}. The working copy is unchanged. For example, if
|
select \gui {Take Snapshot}. The working copy is unchanged. For example, if
|
||||||
you want to try something and find out later that it does not work, you can
|
you want to try something and find out later that it does not work, you can
|
||||||
discard the changes and return to the state of the snapshot.
|
discard the changes and return to the state of the snapshot.
|
||||||
|
|
||||||
To remove a single stashed state from the stash list and apply it on top of
|
To remove a single stashed state from the stash list and apply it on top of
|
||||||
the current working tree state, select \gui {Stash Pop}.
|
the current working tree state, select \gui {Stash Pop}.
|
||||||
|
|
||||||
|
\section3 Applying Actions to Commits
|
||||||
|
|
||||||
|
To browse a directory or the commit history and to apply actions on the
|
||||||
|
commits, select \gui Tools > \gui Git > \gui {Actions on Commits}. You can
|
||||||
|
checkout, revert, or cherry-pick commits or view them in the diff editor.
|
||||||
|
|
||||||
|
\image creator-git-commit-actions.png "Select a Git Commit dialog"
|
||||||
|
|
||||||
\section3 Working with Remote Repositories
|
\section3 Working with Remote Repositories
|
||||||
|
|
||||||
In addition to the standard version control system functions, you can
|
In addition to the standard version control system functions, you can
|
||||||
@@ -492,6 +509,9 @@
|
|||||||
\header
|
\header
|
||||||
\li Menu Item
|
\li Menu Item
|
||||||
\li Description
|
\li Description
|
||||||
|
\row
|
||||||
|
\li \gui{Refresh}
|
||||||
|
\li Refresh the list of remote repositories.
|
||||||
\row
|
\row
|
||||||
\li \gui{Add}
|
\li \gui{Add}
|
||||||
\li Add a new remote repository.
|
\li Add a new remote repository.
|
||||||
@@ -499,12 +519,13 @@
|
|||||||
\li \gui{Fetch}
|
\li \gui{Fetch}
|
||||||
\li Fetch all the branches and change information from a remote
|
\li Fetch all the branches and change information from a remote
|
||||||
repository.
|
repository.
|
||||||
|
\row
|
||||||
|
\li \gui Push
|
||||||
|
\li Push committed changes to the remote repository.
|
||||||
\row
|
\row
|
||||||
\li \gui{Remove}
|
\li \gui{Remove}
|
||||||
\li Remove a remote repository.
|
\li Remove a remote repository.
|
||||||
\row
|
|
||||||
\li \gui{Refresh}
|
|
||||||
\li Refresh the list of remote repositories.
|
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
\section4 Using Git with Subversion
|
\section4 Using Git with Subversion
|
||||||
@@ -525,8 +546,12 @@
|
|||||||
|
|
||||||
\image qtcreator-gerrit-options.png
|
\image qtcreator-gerrit-options.png
|
||||||
|
|
||||||
You can see the same information about each change as in the Gerrit
|
To push committed changes to Gerrit, select \gui Tools > \gui Git >
|
||||||
web interface.
|
\gui {Remote Repository} > \gui {Push to Gerrit}.
|
||||||
|
|
||||||
|
To view the same information about each change as in the Gerrit
|
||||||
|
web interface, select \gui Tools > \gui Git > \gui {Remote Repository} >
|
||||||
|
\gui Gerrit.
|
||||||
|
|
||||||
\image qtcreator-gerrit.png
|
\image qtcreator-gerrit.png
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user