linux下git环境变量配置
来源:互联网 发布:加入网络作协要求 编辑:程序博客网 时间:2024/05/22 10:31
# .bashrc
# User specific aliases and functions
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias la='ls -a'
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# git config start
function git_branch {
branch="`git branch 2>/dev/null | grep "^\*" | sed -e "s/^\*\ //"`"
if [ "${branch}" != "" ];then
if [ "${branch}" = "(no branch)" ];then
branch="(`git rev-parse --short HEAD`...)"
fi
echo " ($branch)"
fi
}
export PS1='\u@\h \[\033[01;36m\]\W\[\033[01;32m\]$(git_branch)\[\033[00m\] \$ '
# git config end
copy下链接中的内容过来
git 命令tab补全:
https://github.com/git/git/tree/master/contrib/completion
激活环境变量
source ~/.bashrc
# User specific aliases and functions
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias la='ls -a'
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# git config start
function git_branch {
branch="`git branch 2>/dev/null | grep "^\*" | sed -e "s/^\*\ //"`"
if [ "${branch}" != "" ];then
if [ "${branch}" = "(no branch)" ];then
branch="(`git rev-parse --short HEAD`...)"
fi
echo " ($branch)"
fi
}
export PS1='\u@\h \[\033[01;36m\]\W\[\033[01;32m\]$(git_branch)\[\033[00m\] \$ '
# git config end
copy下链接中的内容过来
git 命令tab补全:
https://github.com/git/git/tree/master/contrib/completion
激活环境变量
source ~/.bashrc
阅读全文
0 0
- linux下git环境变量配置
- linux下配置环境变量
- Linux下配置环境变量
- Linux下配置环境变量
- linux下配置环境变量
- linux下配置环境变量
- Linux下配置环境变量
- Linux下配置环境变量
- Linux下配置环境变量
- Linux下配置JDK环境变量
- Linux下配置Java环境变量
- linux下配置JDK环境变量
- Linux下配置JDK环境变量
- Linux下配置sdk环境变量
- linux下配置jdk环境变量
- Linux下配置Java环境变量
- linux下环境变量的配置
- linux下jdk环境变量配置
- 例说数据结构&STL(十)——hash_set/unordered_set
- 数据结构--链表
- netty的简单实现
- System.Environment类
- 哲学家就餐问题
- linux下git环境变量配置
- 单词翻转
- java对象和Map互转及测试
- Codeforces contest 787 recordings
- C++详解Leetcode:106. Construct Binary Tree from Inorder and Postorder Traversal
- 精度丢失
- Codeforces contest 376&375 recordings
- 母函数 入门 + 模板
- 适配器模式