windows-10 - 在 Window 10 上遇到 git bash 问题,最近的更改使我无法更新它
问题描述
我安装了 Git 版本 2.31.1.windows.1 并重新安装它。我对其进行了更改以添加新别名。我做了一个尝试获取文件以重新加载它并收到此错误。
bash:/c/Users/DawsonSchaffer/.bashrc:地址错误
所以我恢复了以前的版本,它工作正常。但是我现在仍然遇到同样的错误。我知道这不是很多这是我的 .bashrc 文件
# History settings
HISTCONTROL=ignoreboth
shopt -s histappend
HISTSIZE=1000
HISTFILESIZE=10000
HISTTIMEFORMAT="%F %T "
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
# load color variables
if [ -f ~/.bash_colors ]; then
. ~/.bash_colors
fi
# prompt
if [ "$color_prompt" = yes ]; then
PS1="${GREEN}ganymede@${BLUE}dawson:${ICYAN}\W${RESET}${IYELLOW} \$(parse_git_branch) $ "
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# get current branch in git repo
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
# function parse_git_branch() {
# BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
# if [ ! "${BRANCH}" == "" ]
# then
# STAT=`parse_git_dirty`
# echo "[${BRANCH}${STAT}]"
# else
# echo ""
# fi
# }
# file colors
LS_ORIGINAL=LS_COLORS
LS_COLORS='di=93:*.py=92:*.qml=92sb'
export LS_COLORS
# Alias definitions.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# Alias functions.
if [ -f ~/.bash_functions ]; then
. ~/.bash_functions
fi
# virtual environment home
export WORKON_HOME='C:\Users\DawsonSchaffer\Documents\ProjectsDirectory\virtualenvirinments'
任何帮助将不胜感激。
谢谢道森
解决方案
抱歉,在多次扫描文件后,我终于发现我的 .bashrc 中有一个时髦的字符,一旦我删除它,每个都可以正常工作。
谢谢道森
推荐阅读
- java - 如何防止 Maven 编译 src/test/java 中的类,这些类是在 generate-sources 阶段生成的?
- javascript - 将 gatsby-node 文件重构为单独的文件不起作用
- reactjs - TS7053:元素隐式具有“任何”类型,因为“字符串”类型的表达式不能用于索引类型“行类型”
- database - 如何在 Postgresql 中存储 300M 条记录以运行效率查询
- bash - WSL:无法在路径中运行带有点斜杠 ./ 的可执行文件
- r - 如何反转一个完整的矩阵?
- python - 等待代码执行是否在时间限制之前完成,如果没有在限制内完成则中止
- python - 比较两个列表中的值并从第三个列表中返回相似或最接近的值
- r - 如何用缺失值前后的平均值填充向量中的缺失值
- java - 没有可用的“ru.spb.repository.UserRepository”类型的合格bean:预计至少有1个有资格作为自动装配候选者的bean