Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the exclamation mark mean in git config alias?

Tags:

git

People also ask

What does exclamation mean in git?

That means the Git status is normal. As soon as you start editing a file, the status changes to modified and the icon overlay then changes to a red exclamation mark. That way you can easily see which files were changed since you last updated your working tree and need to be committed.

What are aliases in git?

Git aliases are a powerful workflow tool that create shortcuts to frequently used Git commands. Using Git aliases will make you a faster and more efficient developer. Aliases can be used to wrap a sequence of Git commands into new faux Git command.

What is the use of git config command?

The git config command is a convenience function that is used to set Git configuration values on a global or local project level. These configuration levels correspond to . gitconfig text files. Executing git config will modify a configuration text file.

How do I edit a git alias?

Start a new branch. gitconfig file and add each alias under [alias], like so: Additionally, you can have repo-specific aliases. Just edit . git/config in the repo where you want to add the alias, and follow the same syntax.


From the git-config manual:

If the alias expansion is prefixed with an exclamation point, it will be treated as a shell command.


From https://git-scm.com/book/en/v2/Git-Basics-Git-Aliases

However, maybe you want to run an external command, rather than a Git subcommand. In that case, you start the command with a ! character

So if you only want to use git subcommand, you don't need to use ! here.

But if you want to use git command/external command, then you need !.