##// END OF EJS Templates
shadow-repos: use safer way to destroy shadow repositories....
shadow-repos: use safer way to destroy shadow repositories. we had reported errors on removal of shadow repos. Not reproduced, however suspecting are filesystem sync/symlink race-conditions on shared storage. End result were existing shadow-repo directories that tricked rhodecode into thinking shadow repos is existing, but infact it was a dummy structure semi-removed. Using shutil.move we ENSURE rhodecode doesn't read those back even if removal fails.

File last commit:

r1:854a839a default
r2777:f1cc2e3d default
Show More
rebase-commits-git.rst
54 lines | 1.4 KiB | text/x-rst | RstLexer
/ docs / tutorials / rebase-commits-git.rst
project: added all source files and assets
r1 .. _rebase-rebase-git:
How to Rebase in |git|
======================
Rebasing can take two form in |git|.
* Rebasing changes when you pull from upstream
* Rebasing one branch on top of another
If you need to understand more about branching, and the terminology, see the
:ref:`branch-wf` section.
Rebasing When Pulling from Upstream
-----------------------------------
This will pull any changes from the remote server, and rebase the changes on
your local branch on top of them.
.. code-block:: bash
# Move to the branch you wish to rebase
$ git checkout branchname
# Pull changes on master and rebase on top of latest changes
$ git pull --rebase upstream master
# Push the rebase to origin
$ git push -f origin branchname
Rebasing Branches
-----------------
Rebasing branches in |git| means that you take one branch and rebase the work
on that branch on top of another. In the following example, the
``triple`` branch will be rebased on top of the ``second-pass`` branch.
1. List the available branches in your |repo|.
.. code-block:: bash
$ git branch
first-pass
* master
second-pass
triple
2. Rebase the ``triple`` on top of the ``second-pass`` branch.
.. code-block:: bash
$ git rebase second-pass triple
First, rewinding head to replay your work on top of it...
Fast-forwarded triple to second-pass.