Skip to content

adriensamson/git-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Git utils

Bash status prompt

Installation

  • Add git-status-prompt in your PATH ln -s /path/to/git-utils/git-status-prompt ~/bin/git-status-prompt
  • Add $(git-status-prompt) to the PS1 variable in your ~/.bashrc.

For instance, mine is

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$(git-status-prompt)\$ '

Quick install script:

sed -i "s@\(\\\\\]\)\(\\\\\$ '\)@\1\$($(pwd)/git-status-prompt)\2@" ~/.bashrc

Aliases

  • git a adds all files to staging area
  • git u pulls changes from remote branch (ff-only)
  • git r rebases local branch from corresponding remote branch
  • git p pushes current branch to corresponding remote branch
  • git s for status
  • git d for diff
  • git ds for diff to be commited
  • git ci for commit
  • git co for checkout

Installation

In your ~/.gitconfig:

[include]
        path = /path/to/git-utils/aliases

Quick install script:

cat >>~/.gitconfig <<eof
[include]
    path = $(pwd)/aliases
eof

Global excludes

Installation

In your ~/.gitconfig:

[core]
        excludesfile = /path/to/git-utils/global-excludes

Quick install script:

cat >>~/.gitconfig <<eof
[core]
    excludesfile = $(pwd)/global-excludes
eof

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages