|
| 1 | + $ export RUST_BACKTRACE=1 |
| 2 | + $ git init -q 1> /dev/null |
| 3 | + |
| 4 | + $ git commit -m "Empty initial" --allow-empty 1> /dev/null |
| 5 | + |
| 6 | + $ git log --graph --pretty=%s |
| 7 | + * Empty initial |
| 8 | + |
| 9 | + $ git checkout -b branch2 |
| 10 | + Switched to a new branch 'branch2' |
| 11 | + |
| 12 | + $ echo contents2 > file1 |
| 13 | + $ git add . |
| 14 | + $ git commit -m "mod file1" 1> /dev/null |
| 15 | + |
| 16 | + $ echo contents3 > file3 |
| 17 | + $ git add . |
| 18 | + $ git commit -m "mod file3" 1> /dev/null |
| 19 | + |
| 20 | + $ git checkout master |
| 21 | + Switched to branch 'master' |
| 22 | + |
| 23 | + $ echo contents3 > file2 |
| 24 | + $ git add . |
| 25 | + $ git commit -m "add file2" 1> /dev/null |
| 26 | + |
| 27 | + $ git merge -q branch2 --no-ff |
| 28 | + |
| 29 | + $ git log --graph --decorate --pretty=oneline |
| 30 | + * 882f2656a5075936eb37bfefde740e0b453e4479 (HEAD -> master) Merge branch 'branch2' |
| 31 | + |\ |
| 32 | + | * 87bb87b63d1745136cb2ea167ef3ffc82c7ef3f0 (branch2) mod file3 |
| 33 | + | * 2db14eafe99deeeab5db07bf33e332d523a298ab mod file1 |
| 34 | + * | 54d8f704681c3b44a468cef655fa3b5bc5229a4c add file2 |
| 35 | + |/ |
| 36 | + * 8c26fa0172bda17bafcbcf9684e639c6b0bae9c4 Empty initial |
| 37 | + |
| 38 | + $ josh-filter -s --squash-pattern "refs/tags/*" --update refs/heads/filtered |
| 39 | + Warning: reference refs/heads/filtered wasn't updated |
| 40 | + $ git log --graph --decorate --pretty=oneline refs/heads/filtered |
| 41 | + fatal: ambiguous argument 'refs/heads/filtered': unknown revision or path not in the working tree. |
| 42 | + Use '--' to separate paths from revisions, like this: |
| 43 | + 'git <command> [<revision>...] -- [<file>...]' |
| 44 | + [128] |
| 45 | + |
| 46 | + $ git tag -a tag_a -m "created a tag" 882f2656a5075936eb37bfefde740e0b453e4479 |
| 47 | + $ josh-filter -s --squash-pattern "refs/tags/*" :author=\"New\ Author\"\;\"new@e.mail\" --update refs/heads/filtered |
| 48 | + [1] :author="New Author";"new@e.mail" |
| 49 | + [1] :squash( |
| 50 | + 882f2656a5075936eb37bfefde740e0b453e4479:"refs/tags/tag_a" |
| 51 | + ) |
| 52 | +
|
| 53 | + $ git log --graph --decorate --pretty=oneline refs/heads/filtered |
| 54 | + * d8aa5a9937f4f0bd645dbc0b591bae5cd6b6d91b (tag: filtered/tag_a, filtered) refs/tags/tag_a |
0 commit comments