Skip to content

Commit

Permalink
Adds git-blame-ignore-rev and instructions (quantumlib#3940)
Browse files Browse the repository at this point in the history
Adds git-blame-ignore-rev and instructions.

This sets up git blame, PyCharm and other clients that integrate with git well to ignore large scale refactoring revisions. Note that unfortunately this is not yet supported by Github (https://github.community/t/support-ignore-revs-file-in-githubs-blame-view/3256/21).
  • Loading branch information
balopat authored Mar 20, 2021
1 parent 0d37128 commit cfb2559
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# migrating to the black formatter
a61e51b53612735e93b3bb8a7605030c499cd6c7

# adding flynt formatting for strings
7a335e3ef297057b4a12f7c21d4e8dd426b44ca0
18 changes: 15 additions & 3 deletions docs/dev/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,22 @@ git clone [email protected]:quantumlib/cirq.git
cd Cirq
```

To do your development in a Docker image, you can build one with Cirq/dev_tools/Dockerfile or pull an existing image:
## Recommended git setup

The following command will setup large refactoring revisions to be ignored, when using git blame.

```
git config blame.ignoreRevsFile .git-blame-ignore-revs
```

Note that if you are using PyCharm, you might have to Restart & Invalidate Caches to have the change being picked up.

## Docker

To do your development in a Docker image, you can build one with our `Dockerfile`.
```bash
docker pull quantumlib/cirq:dev
docker run -it quantumlib/cirq:dev python -c "import cirq; print(cirq.google.Foxtail)"
docker build -t cirq .
docker run -it cirq python -c "import cirq; print(cirq.google.Foxtail)"
```


Expand Down

0 comments on commit cfb2559

Please sign in to comment.