my .dotfiles
- Common
cm
forcommit
cme
to add everything and commitco
forcheckout
cob
forcheckout -b
fixup
forcommit --amend
cp
forcherry-pick
st
forstatus
br
forbranch
- Specific for my development
cobf
forcheckout -b feature/<arg name of the branch>
cobb
forcheckout -b hotfix/<arg name of the branch>
cobh
forcheckout -b bugfix/<arg name of the branch>
cobr
forcheckout -b release/<arg name of the branch>
cof
forcheckout feature/<arg name of the branch>
coh
forcheckout hotfix/<arg name of the branch>
cor
forcheckout release/<arg name of the branch>
return
to checkout to the main branchglog
to get a good logslog
to get a good short logsdlog
same as above but includes datessave
to add all changes including untracked files and do a temporal commit, I typically use this along withundo
oramend
wip
same tosave
but doesn't add untracked filesundo
to reset the previous commitwipe
to commit everything in the working directory and then does a hard reset to remove that commit, but that commit can be restored.up
to update the current branch, it's possible this will removed and instead useruffwd
orrupffwd
down
to push all branchs and tagssync
to synchronize the repo, it usesup
to pull anddown
to pushaliases
shows all git aliases- Complex
ruffwd
andrupffwd
doremote update
, the later one with--prune
and updates all tracking branches, see helperffwd
brclean
deletes every branch that’s been merged into the specified branch except the branch, when no branch is specified, it uses the default branchbrunsafed
deletes every branch using-D
that aren't the default, 'master', 'development', 'develop' or 'dev', stands for BRanch UNSAFE Deletebrd
deletes every branch whose remote tracking branch is gone, this also uses-D
brdone
goes to the main branch, updates withgit up
and cleans withbrclean
migrate
explanation from this post:
If I’m on a branch and want to migrate the local only commits over to master, I can just run $ git migrate new-branch-name
. This works whether I’m on master or some other wrong branch.
I can also migrate the commits to a branch created off of something other than master using this command: $ git migrate new-branch other-branch
And finally, if I want to just migrate the last commit to a new branch created off of master, I can do this.
$ git migrate new-branch master HEAD~1
Parameter | Type | Description |
---|---|---|
branch-name | required | Name of the new branch. |
target-branch | required | Defaults to "master". The branch that the new branch is created off of. |
commit-range | required | The commits to migrate. Defaults to the current remote tracking branch. |
- Helpers
default
prints the main branchffwd
to update all tracking branches, more info
ist
for Internet usage STadistic, it requiresvnstat
onegai
to execute the previous command assudo
baka
forgit
e.g.baka pull master
,baka push master
.
pl
forphp artisan
pls
forphp artisan serve
plt
forphp artisan test
dv
, goes to Downloads folder and downloads videos using youtube-dl in the specified quality or lower.
- You need to define the default downloads folder as
~d
e.g.
hash -d d='Your path to the downloads folder' # mine its '/home/alejandro/Downloads'
$ dv <quality> <link> [localization] [extra]
-
quality: Max quality of the video but divided by 100 and rounded by default, e.g for 240p is
2
, for 720p is7
, for 1080 is10
-
link: Link of the video or the id or full name of the youtube video. see youtube-dl readme for more info
-
localization: Localization of the downloaded file, defaults to
~d
. -
extra: Currently it only accepts two options, and it can't be mixed:
- w Downloads the video with the worst audio available
- mp4 Downloads video in MP4 format
Note: You cannot change the order of the arguments, because I'm lazy, but I can accept PRs!
This is from Coder's Tape Deployment Guide:
Let's make the prompt pretty
sudo apt-get install zsh
to install ZSHzsh --version
to confirm installwhereis zsh
to find out where it issudo usermod -s /usr/bin/zsh $(whoami)
to make Zsh defaultsudo reboot
to reapply all changes2
to populate a default filesudo apt-get install powerline fonts-powerline
to install powerlinesudo apt-get install zsh-theme-powerlevel9k
to install Themeecho "source /usr/share/powerlevel9k/powerlevel9k.zsh-theme" >> ~/.zshrc
to enable the theme in your Zshrcexit
and login again to see the new themesh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
for Oh My Zshecho "source /usr/share/powerlevel9k/powerlevel9k.zsh-theme" >> ~/.zshrc
to re-enable 9K
- For
brdone
,brclean
,wip
,save
,wipe
,up
andmigrate
are from haacked - For
ffwd
,ruffwd
andrupffwd
are from muhqu - For How I configured my terminal section is from Coder's Tape Deployment Guide
MIT