github.com/btwiuse/jiri@v0.0.0-20191125065820-53353bcfef54/howdoi.md (about)

     1  # JIRI
     2  
     3  [TOC]
     4  
     5  ## How Do I
     6  
     7  ### rebase current tracked branch instead of fast-forwarding it
     8  
     9  `jiri update -rebase-tracked`
    10  
    11  ### rebase all my branches
    12  
    13  Run  `jiri update -rebase-all`. This will not rebase un-tracked branches.
    14  
    15  ### rebase my untracked branches
    16  
    17  Run `jiri update -rebase-untracked` to rebase your current un-tracked branch. To rebase all un-tracked branches use `jiri update -rebase-all -rebase-untracked`.
    18  
    19  ### test my local manifest changes
    20  
    21  `jiri update -local-manifest`
    22  
    23  ### stop jiri from updating my project
    24  
    25  Use `jiri project-config`. [See this](/behaviour.md#intended-project-config) for it's intended behavior.
    26  Current config can be displayed using command `jiri project-config`.
    27  To change a config use
    28  ```
    29  jiri project-config [-flag=true|false]
    30  ```
    31  where flags are `-ignore`, `no-rebase`, `no-update`
    32  
    33  ### check if all my projects are on `JIRI_HEAD` {#use-jiri-status}
    34  
    35  Run `jiri status ` for that. This command returns all projects which are not on `JIRI_HEAD`, or have un-merged commits, or have un-committed changes.
    36  
    37  To just get projects which are **not** on **JIRI_HEAD** run
    38  ```
    39  jiri status -changes=false -commits=false
    40  ```
    41  ### run a command inside all my projects
    42  
    43  `jiri runp [command]`
    44  
    45  ### grep across projects
    46  
    47  Run `jiri grep [text]`. Run `jiri help grep` to see supported flags.
    48  
    49  ### Run hooks without updating sources
    50  `jiri run-hooks`
    51  
    52  ### Set hook timeout
    53  `jiri update -hook-timeout=<minutes>` or `jiri run-hooks -hook-timeout=<minutes>`
    54  
    55  ### delete branch across projects
    56  
    57  Run `jiri branch -d [branch_name]`, this will run `git branch -d [branch_name]` in all the projects. `-D` can also be used to replicate functionality of `git branch -D`.
    58  
    59  ### delete merged branches
    60  `jiri branch -delete-merged`
    61  
    62  ### delete merged branches with different commits
    63  Run `jiri branch -delete-merged-cl`. This will check gerrit and delete all those branches whose commits have been submitted, by matching gerrit change list ID. **Use this with caution**.
    64  
    65  ### get projects and branches other than master
    66  
    67  `jiri branch`
    68  
    69  ### find difference between two snapshots
    70  Run `jiri diff <old_snapshot> <new_snapshot>`. *old_snapshot* and *new_snapshot* can be file paths or urls.
    71  
    72  ### download whole gerrit topic
    73  
    74  `jiri patch -topic <topic>`
    75  
    76  ### update jiri without updating projects
    77  
    78  `jiri selfupdate`
    79  
    80  ### use upload to push CL
    81  
    82  [See This](/README.md#Gerrit-CL-workflow)
    83  
    84  ### get JIRI_HEAD revision of a project
    85  
    86  `git rev-parse JIRI_HEAD` from inside the project.
    87  
    88  ### get current revision of a project
    89  
    90  `jiri project [project-name]`
    91  
    92  ### clean project(s)
    93  
    94  Run `jiri project [-clean|clean-all] [project-name]`. See it's [intended behaviour](/behaviour.md#intended-project-clean).
    95  
    96  ### get help
    97  
    98  Run `jiri help` to see all the commands and `jiri help [command]` to get help for that command.
    99  
   100  To provide feedback [see this](/behaviour.md#feedback).