Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
355b4f11
提交
355b4f11
authored
4月 08, 2010
作者:
Brian West
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of git.freeswitch.org:freeswitch
上级
daa9b87f
5c668de7
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
76 行增加
和
0 行删除
+76
-0
setup-git.sh
scripts/setup-git.sh
+76
-0
没有找到文件。
scripts/setup-git.sh
0 → 100755
浏览文件 @
355b4f11
#!/bin/bash
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
##### setup git properly for FreeSWITCH
if
[
!
-d
.git
]
;
then
echo
"error: must be run from within the top level of a FreeSWITCH git tree."
1>&2
exit
1
;
fi
err
()
{
echo
"error:
$1
"
1>&2
exit
1
}
if
!
git config user.name
>
/dev/null 2>&1
;
then
name
=
$(
git config user.name
)
[
-z
"
$name
"
]
\
&&
[
-n
"
$NAME
"
]
&&
name
=
"
$NAME
"
||
name
=
""
echo
-n
"What is your name? [
$name
]: "
read
name_
[
-n
"
$name_
"
]
&&
name
=
"
$name_
"
[
-z
"
$name
"
]
&&
err
"Your name is required."
git config
--global
user.name
"
$name
"
fi
if
!
git config user.email
>
/dev/null 2>&1
;
then
email
=
$(
git config user.email
)
[
-z
"
$email
"
]
\
&&
[
-n
"
$EMAIL
"
]
&&
email
=
"
$EMAIL
"
||
email
=
""
echo
-n
"What is your email? [
$email
]: "
read
email_
[
-n
"
$email_
"
]
&&
email
=
"
$email_
"
[
-z
"
$email
"
]
&&
err
"Your email is required."
git config
--global
user.email
"
$email
"
fi
git config branch.master.rebase
true
cat
1>&2
<<
EOF
----------------------------------------------------------------------
Git has been configured for FS successfully.
branch.master.rebase has been set to true
This means that when you do a 'git pull' to fetch remote changes,
your local changes will be rebased on top of the remote changes.
This does NOT rewrite history on the remote FS repo, but it does
change the commit hashes in your local tree.
If you really want to merge rather than rebasing, run:
git merge [refspec]
See 'man git-config' for more information.
EOF
[
-n
"
$name
"
]
\
&&
cat
1>&2
<<
EOF
Your name has been set to:
$name
via 'git config --global user.name "
$name
"
EOF
[
-n
"
$name
"
]
\
&&
cat
1>&2
<<
EOF
Your email has been set to:
$email
via 'git config --global user.email "
$email
"
EOF
cat
1>&2
<<
EOF
----------------------------------------------------------------------
EOF
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论