Skip to content

Commit ae532a7

Browse files
committed
Add instructions on supressing warning and calling as a global function.
1 parent e6a1613 commit ae532a7

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

README.md

+17-4
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,30 @@ cd path/to/repo
2929
./changeauthor.sh [OPTIONS]...
3030
```
3131

32-
Alternatively, you may execute with either of the following:
32+
If you did not change the permissions to allow execution, you can also call the script with either of the following:
3333

3434
``` sh
35-
sh ./changeauthor.sh [OPTIONS]...
36-
3735
bash ./changeauthor.sh [OPTIONS]...
36+
37+
sh ./changeauthor.sh [OPTIONS]...
3838
```
3939

4040
If you run the script with no [option flags](#options), you will be prompted for the needed values via interactive prompts. The script will then proceed to update your local repository and push the changes to the specified remote.
4141

42-
If you did not change the permissions to allow execution, you can also call the script with `bash ./changeauthor.sh`
42+
If you would like to suppress the git-filter-branch warning, simply add the following line the `~/.bashrc` file on your computer:
43+
44+
``` sh
45+
export FILTER_BRANCH_SQUELCH_WARNING=1
46+
```
47+
48+
If you prefer to set up the script as a function you can call from anywhere, add the following function to your `~/.bashrc` file:
49+
50+
``` sh
51+
function changegitauthor() {
52+
# Update the path to point to the absolute path of the script on your computer
53+
bash /c/absolute/path/to/change-git-author/changeauthor.sh "$@"
54+
}
55+
```
4356

4457
## Options
4558

0 commit comments

Comments
 (0)