log can be in your custom format, mine is a little bit complicated because of colors, it shows hash, date, time, branch, author and message in one line
PS sorry for such big comment
PS2 and I've found one of my sources, there are a lot of useful aliases there, you can chose something which is suited you gist.github.com/robmiller/6018582
I use gitx on Mac to do most of my committing just because I want to be sure what's in and what's not in the commit.
I've always done command line aliases (bash and bat), like 's' for 'git status', but I'm starting to think about using git aliases instead to remind myself I'm still in a git frame of mind.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice guide to git aliases.
I will say though, 'git add .' is a bad habit I see a lot of developers do. I often find others adding more than they want or need to a commit.
+100 for leaving a comment in your aliases. When I add an alias to bash from some online source I like to document it too.
For that reason I use shell alias which shows status after adding something
a = "!f() { git add ${1-.} $2 $3 $4 && git status; }; f"
and also I will put just several aliases which I find very useful, unfortunately some of them won't work on windows
shows aliases it is very convenient for seldom used aliases and when you just have added some new (won't work on windows)
I really like short form of status
s = status -s
and because of that st is full form
st = status
log can be in your custom format, mine is a little bit complicated because of colors, it shows hash, date, time, branch, author and message in one line
log with modified files list
lf = "!git l --name-status"
Get the current branch name (used in other aliases)
branch-name = rev-parse --abbrev-ref HEAD
Push the current branch to the remote "origin", and set it to track the upstream branch
publish = "!git push -u origin $(git branch-name)"
PS sorry for such big comment
PS2 and I've found one of my sources, there are a lot of useful aliases there, you can chose something which is suited you gist.github.com/robmiller/6018582
Hey Mark,
thanks for the feedback.
It's a good point yes and I have bee caught out by this in the past.
What I didn't mention is that I use VSCode and it's awesome git interface for adding specific files for what to commit.
I do use
git s
(git status
) quite heavily when not in VSCode.I use gitx on Mac to do most of my committing just because I want to be sure what's in and what's not in the commit.
I've always done command line aliases (bash and bat), like 's' for 'git status', but I'm starting to think about using git aliases instead to remind myself I'm still in a git frame of mind.