这个插件,实际上是Oh-my-zsh安装时候,就自动激活的。目的很简单:简化git命令,原理是使用了alias来给命令取别名。 举个例子,我本来使用git命令,添加当前文件夹里所有文件进行,以备commit,是不是需要: 代码语言:shell AI代码解释 gitadd--all 但是,我们可以编写一条alias来简化: 代码语言:shell AI代码解释 aliasga...
一、安装zsh、git、wget 安装oh-my-zsh的前提需要先安装zsh并且版本至少为 4.3.9。推荐使用 5.0.8 或更新版本 bash yum install -y wget git zsh 二、安装运行脚本 oh-my-zsh官网:https://ohmyzsh.sh/#insatll 1、curl/wget下载 使用curl: zsh sh -c"$(curl -fsSL https://raw.githubusercontent.com...
安装完成之后,要确认是否安装成功,可以在终端当中输入git —version命令,如果可以看到 Git 的版本号,说明已经成功安装: # git --versiongit version 2.17.1 root@DESKTOP-HVI7SH0:/home/liuawen/git# apt install gitReading package lists... Done Building dependency tree Reading state information... Done gi...
git clone https://github.com/zsh-users/zsh-completions$ZSH_CUSTOM/plugins/zsh-completions 然后执行 ! grep -q"autoload -U compinit && compinit"~/.zshrc&&echo"autoload -U compinit && compinit">> ~/.zshrc sed -i'/^plugins=/c\plugins=(git sudo z zsh-syntax-highlighting zsh-autosuggestions ...
# 比如`git status`时,只需要输入`gst`。`git pull`时,只需要输入`gl`。`git push`时,只需要输入`gp`等等。 是因为配置里有这些简写,还有更多可以查看这里oh my zsh plugin git.plugin.zsh文档配置,github oh my zsh plugin git.plugin.zsh文件地址。安装成功后,同时会创建~/.oh-my-zsh的文件夹,其实就...
alias gst='git status' alias gp='git push' alias gco='git checkout' alias glog='git log --oneline --decorate --graph' alias gloga='git log --oneline --decorate --graph --all' alias gp='git push' alias gmg999='git merge --no-ff --log=999'您...
安装oh-my-zsh 后默认会打开 git 插件,它会在命令行下光标前显示当前分支名称,还可以实现自动补全,输入 git re 按 tab 会自提示可以选择命令,再按 tab 就可以选择命令,方便命令输入。 这里罗列几个常用的作为示例,展示它们的作用:
git config --global user.name userName git config --global user.email userEmail 分支1 标签0 btwiseupdate from github742869418天前 7524 次提交 提交 .devcontainer feat: adddevcontainersconfiguration (#12783) 5个月前 .github chore(deps): bump certifi in /.github/workflows/dependencies (#12955) ...
git clone https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zsh 2. Optionally, Backup Your Existing ~/.zshrc File cp ~/.zshrc ~/.zshrc.orig 3. Create A New Zsh Configuration File You can create a new zsh config file by copying the template that we have included for you. cp...
git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions 目录跳转 sudo apt-get install autojump 安装完成之后,再次 source ~/.zshrc 总结 最终效果 还需要再改一改 配色需要再改一改,暂时先这样。oh-my-zsh还需安装更多实用的插件,主题也体验以下其它。 目前Ubunt...