Skip to content

Instantly share code, notes, and snippets.

@wesolowski
Last active March 4, 2021 10:29
Show Gist options
  • Save wesolowski/925990cd158c097523e2740b91b3ad31 to your computer and use it in GitHub Desktop.
Save wesolowski/925990cd158c097523e2740b91b3ad31 to your computer and use it in GitHub Desktop.
Cofig file for new comp
# Alias for Windows folder
alias winhome="cd /mnt/c/Users/wesolowski/Desktop/"
alias work="cd ~/workspace"
alias workspace=work
alias nexus="cd ~/workspace/nexus"
phpunit() {
if [ -e bin/phpunit ]
then
php bin/phpunit $@
else
vendor/bin/phpunit $@
fi
}
console() {
if [ -e bin/console ]
then
bin/console $@
else
vendor/bin/console $@
fi
}
export XDEBUG_SESSION=PHPSTORM
[user]
name = Rafal Wesolowski
email = wesolowski@nexus-netsoft.com
[alias]
o = checkout
ob = checkout -b
ss = status -s
s = status
m = merge
h = push
p = pull
pm = pull origin master
d = diff
ds = diff --stat
c = commit
cm = commit -m
a = add
# one-line log
l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
b = branch
# list branches sorted by last modified
bs = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'"
# list aliases
la = "!git config -l | grep alias | cut -c 7-"
# ssh config
Host bitbucket.org
HostName bitbucket.org
IdentityFile ~/.ssh/id_rsa_git
Host github.com
HostName github.com
IdentityFile ~/.ssh/id_rsa_git
Host gitlab.nxs360.com
HostName gitlab.nxs360.com
IdentityFile ~/.ssh/id_rsa_git

For Linux

  • .bash_aliases (path: ~/.bash_aliases)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment