llvm.org GIT mirror llvm / e1f0790
Updated GettingStarted.rst so that it references utils/git-svn for git-svnup instead of catting it into the documentation itself. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180589 91177308-0d34-0410-b5e6-96231b3b80d8 Michael Gottesman 6 years ago
1 changed file(s) with 14 addition(s) and 29 deletion(s). Raw diff Collapse all Expand all
662662 ``checkout`` each working branch individually and ``rebase`` it on top of its
663663 parent branch.
664664
665 For those who wish to be able to update an llvm repo in a simpler fashion,
666 consider placing the following Git script in your path under the name
667 ``git-svnup``:
668
669 .. code-block:: bash
670
671 #!/bin/bash
672
673 STATUS=$(git status -s | grep -v "??")
674
675 if [ ! -z "$STATUS" ]; then
676 STASH="yes"
677 git stash >/dev/null
678 fi
679
680 git fetch
681 OLD_BRANCH=$(git rev-parse --abbrev-ref HEAD)
682 git checkout master 2> /dev/null
683 git svn rebase -l
684 git checkout $OLD_BRANCH 2> /dev/null
685
686 if [ ! -z $STASH ]; then
687 git stash pop >/dev/null
688 fi
689
690 Then to perform the aforementioned update steps go into your source directory
691 and just type ``git-svnup`` or ``git svnup`` and everything will just work.
692
693 To commit back changes via git-svn, use ``dcommit``:
665 For those who wish to be able to update an llvm repo/revert patches easily using
666 git-svn, please look in the directory for the scripts ``git-svnup`` and
667 ``git-svnrevert``.
668
669 To perform the aforementioned update steps go into your source directory and
670 just type ``git-svnup`` or ``git svnup`` and everything will just work.
671
672 If one wishes to revert a commit with git-svn, but do not want the git hash to
673 escape into the commit message, one can use the script ``git-svnrevert`` or
674 ``git svnrevert`` which will take in the git hash for the commit you want to
675 revert, look up the appropriate svn revision, and output a message where all
676 references to the git hash have been replaced with the svn revision.
677
678 To commit back changes via git-svn, use ``git svn dcommit``:
694679
695680 .. code-block:: console
696681