Created
May 5, 2021 13:51
-
-
Save raloliver/9b01ebc6aed98966b5d0905e90398714 to your computer and use it in GitHub Desktop.
git.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
mail = [email protected] | |
name = username | |
email = [email protected] | |
[core] | |
editor = code --wait | |
[alias] | |
s = !git status | |
c = !git add --all && git commit -m | |
l = !git log --pretty=format:'%C(blue)%h%C(red)%d %C(white)%s - %C(cyan)%cn, %C(green)%cr' |
And if you don't have any new untracked files, you can commit all in the current dir and below, without using add
and without an alias.
$ git commit .
Or target a dir or file.
$ git commit foo.txt
$ git commit foo*.js
$ git commit tests/
Great tips Michael... I never do deep into git stuff, this is my first time with shortcuts on git... I only config the user stuff.
Glad to help. Here are most of my aliases if you are interested. https://github.com/MichaelCurrin/dotfiles/blob/master/.gitconfig.toml
In particular, see alias
, which let's me run git alias
and see a list of my aliases :).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi.
You can drop the
!
for git commands.I like
If you need to use the shell, then add
!
.You might also want to use quotes - double quotes as above and not single quotes.