摘要:最近切換到上開(kāi)發(fā)自然就用上了。本來(lái)在上使用時(shí),我有自定義的一套縮寫(xiě)。既然提供很多強(qiáng)大的縮寫(xiě),那么我也沒(méi)必要自己再搞一套。本來(lái)我還糾結(jié)買(mǎi)好,還是買(mǎi)好最終買(mǎi)了想看使用體會(huì)的。可以看文章最后。對(duì)比我十幾年的使用體會(huì),談?wù)勈褂萌斓母惺堋?/p>
最近切換到mac上開(kāi)發(fā),自然就用上了oh-my-zsh。本來(lái)在windows上使用git時(shí),我有自定義的一套縮寫(xiě)。既然ohmyzsh提供很多強(qiáng)大的縮寫(xiě),那么我也沒(méi)必要自己再搞一套。
本來(lái)我還糾結(jié)買(mǎi)x1carbon好,還是買(mǎi)macbook pro好?最終買(mǎi)了macbook, 想看使用體會(huì)的。可以看文章最后。
1 常用的配置alias ga="git add" alias gb="git branch" alias gba="git branch -a" alias gbd="git branch -d" alias gcam="git commit -a -m" alias gcb="git checkout -b" alias gco="git checkout" alias gcp="git cherry-pick" alias gd="git diff" alias gfo="git fetch origin" alias ggpush="git push origin $(git_current_branch)" alias ggsup="git branch --set-upstream-to=origin/$(git_current_branch)" alias glgp="git log --stat -p" alias gm="git merge" alias gp="git push" alias gst="git status" alias gsta="git stash save" alias gstp="git stash pop"2 所有的配置
參考: https://github.com/robbyrusse...
alias g="git" alias ga="git add" alias gaa="git add --all" alias gapa="git add --patch" alias gau="git add --update" alias gb="git branch" alias gba="git branch -a" alias gbd="git branch -d" alias gbda="git branch --no-color --merged | command grep -vE "^(*|s*(master|develop|dev)s*$)" | command xargs -n 1 git branch -d" alias gbl="git blame -b -w" alias gbnm="git branch --no-merged" alias gbr="git branch --remote" alias gbs="git bisect" alias gbsb="git bisect bad" alias gbsg="git bisect good" alias gbsr="git bisect reset" alias gbss="git bisect start" alias gc="git commit -v" alias gc!="git commit -v --amend" alias gcn!="git commit -v --no-edit --amend" alias gca="git commit -v -a" alias gca!="git commit -v -a --amend" alias gcan!="git commit -v -a --no-edit --amend" alias gcans!="git commit -v -a -s --no-edit --amend" alias gcam="git commit -a -m" alias gcsm="git commit -s -m" alias gcb="git checkout -b" alias gcf="git config --list" alias gcl="git clone --recursive" alias gclean="git clean -fd" alias gpristine="git reset --hard && git clean -dfx" alias gcm="git checkout master" alias gcd="git checkout develop" alias gcmsg="git commit -m" alias gco="git checkout" alias gcount="git shortlog -sn" compdef _git gcount alias gcp="git cherry-pick" alias gcpa="git cherry-pick --abort" alias gcpc="git cherry-pick --continue" alias gcs="git commit -S" alias gd="git diff" alias gdca="git diff --cached" alias gdct="git describe --tags `git rev-list --tags --max-count=1`" alias gdt="git diff-tree --no-commit-id --name-only -r" alias gdw="git diff --word-diff" gdv() { git diff -w "$@" | view - } compdef _git gdv=git-diff alias gf="git fetch" alias gfa="git fetch --all --prune" alias gfo="git fetch origin" function gfg() { git ls-files | grep $@ } compdef _grep gfg alias gg="git gui citool" alias gga="git gui citool --amend" ggf() { [[ "$#" != 1 ]] && local b="$(git_current_branch)" git push --force origin "${b:=$1}" } compdef _git ggf=git-checkout ggl() { if [[ "$#" != 0 ]] && [[ "$#" != 1 ]]; then git pull origin "${*}" else [[ "$#" == 0 ]] && local b="$(git_current_branch)" git pull origin "${b:=$1}" fi } compdef _git ggl=git-checkout ggp() { if [[ "$#" != 0 ]] && [[ "$#" != 1 ]]; then git push origin "${*}" else [[ "$#" == 0 ]] && local b="$(git_current_branch)" git push origin "${b:=$1}" fi } compdef _git ggp=git-checkout ggpnp() { if [[ "$#" == 0 ]]; then ggl && ggp else ggl "${*}" && ggp "${*}" fi } compdef _git ggpnp=git-checkout ggu() { [[ "$#" != 1 ]] && local b="$(git_current_branch)" git pull --rebase origin "${b:=$1}" } compdef _git ggu=git-checkout alias ggpur="ggu" compdef _git ggpur=git-checkout alias ggpull="git pull origin $(git_current_branch)" compdef _git ggpull=git-checkout alias ggpush="git push origin $(git_current_branch)" compdef _git ggpush=git-checkout alias ggsup="git branch --set-upstream-to=origin/$(git_current_branch)" alias gpsup="git push --set-upstream origin $(git_current_branch)" alias ghh="git help" alias gignore="git update-index --assume-unchanged" alias gignored="git ls-files -v | grep "^[[:lower:]]"" alias git-svn-dcommit-push="git svn dcommit && git push github master:svntrunk" compdef _git git-svn-dcommit-push=git alias gk="gitk --all --branches" compdef _git gk="gitk" alias gke="gitk --all $(git log -g --pretty=%h)" compdef _git gke="gitk" alias gl="git pull" alias glg="git log --stat" alias glgp="git log --stat -p" alias glgg="git log --graph" alias glgga="git log --graph --decorate --all" alias glgm="git log --graph --max-count=10" alias glo="git log --oneline --decorate" alias glol="git log --graph --pretty="%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset" --abbrev-commit" alias glola="git log --graph --pretty="%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset" --abbrev-commit --all" alias glog="git log --oneline --decorate --graph" alias gloga="git log --oneline --decorate --graph --all" alias glp="_git_log_prettily" compdef _git glp=git-log alias gm="git merge" alias gmom="git merge origin/master" alias gmt="git mergetool --no-prompt" alias gmtvim="git mergetool --no-prompt --tool=vimdiff" alias gmum="git merge upstream/master" alias gp="git push" alias gpd="git push --dry-run" alias gpoat="git push origin --all && git push origin --tags" compdef _git gpoat=git-push alias gpu="git push upstream" alias gpv="git push -v" alias gr="git remote" alias gra="git remote add" alias grb="git rebase" alias grba="git rebase --abort" alias grbc="git rebase --continue" alias grbi="git rebase -i" alias grbm="git rebase master" alias grbs="git rebase --skip" alias grh="git reset HEAD" alias grhh="git reset HEAD --hard" alias grmv="git remote rename" alias grrm="git remote remove" alias grset="git remote set-url" alias grt="cd $(git rev-parse --show-toplevel || echo ".")" alias gru="git reset --" alias grup="git remote update" alias grv="git remote -v" alias gsb="git status -sb" alias gsd="git svn dcommit" alias gsi="git submodule init" alias gsps="git show --pretty=short --show-signature" alias gsr="git svn rebase" alias gss="git status -s" alias gst="git status" alias gsta="git stash save" alias gstaa="git stash apply" alias gstc="git stash clear" alias gstd="git stash drop" alias gstl="git stash list" alias gstp="git stash pop" alias gsts="git stash show --text" alias gsu="git submodule update" alias gts="git tag -s" alias gtv="git tag | sort -V" alias gunignore="git update-index --no-assume-unchanged" alias gunwip="git log -n 1 | grep -q -c "--wip--" && git reset HEAD~1" alias gup="git pull --rebase" alias gupv="git pull --rebase -v" alias glum="git pull upstream master" alias gwch="git whatchanged -p --abbrev-commit --pretty=medium" alias gwip="git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify -m "--wip-- [skip ci]""3 最后
macbook是讓我又舒服又難受的產(chǎn)品。對(duì)比我十幾年的windows使用體會(huì),談?wù)勈褂萌靘acbook的感受。
舒服的理由如下:
視網(wǎng)膜屏幕寫(xiě)代碼真的很舒服
oh-my-zsh,alfred等mac上的神器用起來(lái)真舒服
觸摸板真的用起來(lái)很舒服,基本上不用鼠標(biāo)
偶爾想起一件事情,打開(kāi)電腦就能用,很舒服
背在包里感覺(jué)不到重量,很舒服
QQ不會(huì)彈出煩人的廣告,很舒服
軟件的界面顏值都很高,字體舒服
難受的理由如下:
接口真少的可憐,只有兩個(gè)雷電接口,一個(gè)耳機(jī)借口。插個(gè)usb還要買(mǎi)轉(zhuǎn)接線,轉(zhuǎn)接線都不便宜。
各種window軟件使用不舒服,要在虛擬機(jī)里面搞,難受
不知道為什么,mac版的谷歌瀏覽器最近崩潰頻率有點(diǎn)高,難受
結(jié)論:如果你無(wú)法接受我最壞的一面,你也不配擁有我最好的一面?!旣惿彙?mèng)露
文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請(qǐng)注明本文地址:http://systransis.cn/yun/91864.html
摘要:入手后先用來(lái)升級(jí)一下設(shè)置非用戶(hù)新增用戶(hù)為你的服務(wù)器新增一個(gè)用戶(hù)用戶(hù)名密碼設(shè)置新增用戶(hù)之后就設(shè)置為非登錄的,新用戶(hù)可以登錄修改這樣就可以禁止用戶(hù)登錄了。 入手后先用 yum -y update 來(lái)升級(jí)一下 1 設(shè)置非root用戶(hù) 1.1 新增用戶(hù) 為你的服務(wù)器新增一個(gè)用戶(hù) useradd 用戶(hù)名 passwd 密碼 1.2 設(shè)置ssh 新增用戶(hù)之后就設(shè)置root為非ssh登錄的,新用戶(hù)可...
閱讀 2391·2021-11-24 09:39
閱讀 3861·2021-11-19 09:40
閱讀 2236·2021-09-27 13:36
閱讀 1939·2019-08-30 15:44
閱讀 435·2019-08-30 13:52
閱讀 2755·2019-08-30 11:13
閱讀 2276·2019-08-29 16:18
閱讀 1820·2019-08-29 15:43