How many times a day do you write git add, git commit -m and git push in your terminal? Tons! Wouldn't it be nice if there was a faster way to writ...
For further actions, you may consider blocking this person and/or reporting abuse
I made a couple recently while working on a Rails project.
I have the reload alias because I find myself tweaking my dotfiles frequently while working.
Inspired by Oh My Zsh, there's Oh My Posh for PowerShell. It focuses only on command-line theming (no Git aliases).
github.com/JanDeDobbeleer/oh-my-posh
Combined with posh-git, it provides a very nice experience for Windows users with PowerShell.
I can't live without being able to entirely clear the terminal and its scrollback buffer:
Checking what directories and files are eating your precious disk space is invaluable too, and sorting the output (for GNU, not BSD/Mac):
No need to keep typing
git
all the time when you can just:My long list of git aliases for extreme efficiency, most of which I use daily:
And when you're feeling too lazy to write proper commit messages:
(don't actually do this 😛)
This one formats the git log to be more concise:
ls = git log --pretty=format:"%ci\\ %C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
Delete all branches that were once part of origin, but are no longere there. Any local branches you have made but not pushed will be safe.
prune-branches = git remote prune origin && git branch -vv | grep ': gone]' | awk '{print $1}' | xargs -r git branch -D
What I use for git:
For hugo:
To generate a UUID (universally unique identifier) quickly:
To do an
ls
every time I do acd
:gpod: git pull origin development
grod: git rebase -i development (grod as in "Git Rebase On top of Development"; the "o" is for "on")
(because when working on I team, I always have to remember to get current first...that's easy to forget)
Not super original but I like:
git cm (commit --message)
git pr (pull --rebase)
git ss (stash --save)
git lg (git --log --oneline ???) and other nice options.
my favorite zsh alias is
gpsup
forgit push --set-upstream
After reading this I was interested how to make alias with variable, so I googled it and find out you can use functions since aliases do not support variable.
Put this inside function in your .bashrc or .zshrc file:
To move file.md to documents just use:
Or... you can put the function in an alias: