Browse Source

[command] git-graph: pretty git log graph

pull/1/head
Muthu Kumar 6 years ago
parent
commit
651b74f9a0
  1. 1
      scripts/README.md
  2. 9
      scripts/mkr.sh

1
scripts/README.md

@ -36,6 +36,7 @@ mkr-update
- `mkd </path/to/dir>` : Creates dir at given path and changes cwd to it - `mkd </path/to/dir>` : Creates dir at given path and changes cwd to it
- `rmd [dir]` : Removes current directory and moves up OR removes directory by given name - `rmd [dir]` : Removes current directory and moves up OR removes directory by given name
- git - git
- `git-graph` : Opens a pretty commit log graph
- `commit <commit-message>` : Adds all untracked files and commits them - `commit <commit-message>` : Adds all untracked files and commits them
- `push <commit-message> [remote branch]` : Adds all untracked files, commits and pushes them - `push <commit-message> [remote branch]` : Adds all untracked files, commits and pushes them
- `dotgit [commands...]` : Requires a `~/.dotfiles` bare repo to exist - `dotgit [commands...]` : Requires a `~/.dotfiles` bare repo to exist

9
scripts/mkr.sh

@ -20,8 +20,7 @@ alias clip="xclip -selection clipboard"
alias update="sudo apt-get update" alias update="sudo apt-get update"
alias i="sudo apt-get install -y" alias i="sudo apt-get install -y"
alias purge="sudo apt purge -y" alias purge="sudo apt purge -y"
alias ar="sudo apt autoremove -y" alias autoremove="sudo apt autoremove -y"
alias autoremove="sudo apt autoremove -y" # Alias of ar
## To install without -y ## To install without -y
@ -54,7 +53,11 @@ rmd () {
# Git commands # Git commands
## low-level `dot-git-cmd`, to be used for `dotgit` command ## git graph
## Usage: git graph
alias git-graph='git log --graph --date-order --pretty=format:"%C(bold yellow)%h%C(auto)%d %C(cyan)%an%C(bold white) %s %C(auto)%C(green)(%ar)%C(reset)"'
## lower-level `dot-git-cmd`, to be used for `dotgit` command
alias dot-git-cmd="git --git-dir=$HOME/.dotfiles --work-tree=$HOME" alias dot-git-cmd="git --git-dir=$HOME/.dotfiles --work-tree=$HOME"
# Manage dotfiles repo # Manage dotfiles repo

Loading…
Cancel
Save