mirror of
https://github.com/tiimgreen/github-cheat-sheet.git
synced 2025-08-15 12:23:57 +02:00
Add --global' to alias helpers
This commit is contained in:
@@ -657,19 +657,19 @@ To add an alias, either navigate to `~/.gitconfig` and fill it out in the follow
|
|||||||
...or type in the command-line:
|
...or type in the command-line:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ git config alias.new_alias git_function
|
$ git config --global alias.new_alias git_function
|
||||||
```
|
```
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ git config alias.cm commit
|
$ git config --global alias.cm commit
|
||||||
```
|
```
|
||||||
|
|
||||||
For an alias with multiple functions use quotes:
|
For an alias with multiple functions use quotes:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ git config alias.ac 'add -A . && commit'
|
$ git config --global alias.ac 'add -A . && commit'
|
||||||
```
|
```
|
||||||
|
|
||||||
Some useful aliases include:
|
Some useful aliases include:
|
||||||
|
Reference in New Issue
Block a user