查看“︁Git/配置”︁的源代码
来自康健生活
←
Git/配置
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
== 初始化 == {{shc|<syntaxhighlight lang="bash"> git init</syntaxhighlight>|$|/home/kangkk}} == 用户设置 == {{Shc_out|<syntaxhighlight lang="bash"> git config --list</syntaxhighlight>|<syntaxhighlight lang="bash"> credential.helper=osxkeychain user.name=kangjian user.email=kangjian@360.cn </syntaxhighlight>|➜ ~}} === --global === 设置全局用户信息。 {{shc|<syntaxhighlight lang="bash"> git config --global user.name "kangkk" && \ git config --global user.email "365@kangkk.com"</syntaxhighlight>|$|/home/kangkk}} === --local === 单独设置项目内用户信息。 {{shc|<syntaxhighlight lang="bash"> git config --local user.name "kangjian" && \ git config --local user.email "kangjian@360.cn"</syntaxhighlight>|$|/home/kangkk}} === 设置编辑器 === {{shc|<syntaxhighlight lang="bash"> git config --global core.editor emacs</syntaxhighlight>|$|/home/kangkk}} === 设置缩写 === {{shc|<syntaxhighlight lang="bash"> git config --global alias.co checkout git config --global alias.l "log --graph --oneline " git config --global alias.ls 'log --graph --pretty=format:"%h <%an> %ar %s"'</syntaxhighlight>|$|/home/kangkk}} 示例,查看 log 信息。 {{Shc_out|<syntaxhighlight lang="bash"> git l</syntaxhighlight>|<syntaxhighlight lang="bash"> * 7376210 (HEAD -> master, origin/master, origin/HEAD) 添加通过数据库查询最后版本号码的说明 * 2afdd49 添加通过数据库查询最后版本号码 ... * b7b05de 更新 https 证书 * f199050 Merge branch 'master' of git.a.b.net:qiwoo/xxx |\ | * 44ad8c1 fix bug | * 82685ae fix typo | * 1dc08a2 fix typo | * b5f5d7a 增加 ${HOSTNAME} 注入 | * 57e0681 更新日志位置 | * ae6b865 update think-logger 版本 * | 9ab1663 更新https的ssl证书 |/ * 6a54234 remove @2017 </syntaxhighlight>|$|/home/kangkk}} {{Shc_out|<syntaxhighlight lang="bash"> git ls </syntaxhighlight>|<syntaxhighlight lang="bash"> * 7376210 <kangjian> 6 周前 添加通过数据库查询最后版本号码的说明 ... * b7b05de <lizheming> 2 年 1 个月前 更新 https 证书 * f199050 <linxd> 2 年 2 个月前 Merge branch 'master' of git.a.b.net:qiwoo/xxx |\ | * 44ad8c1 <lizheming> 2 年 3 个月前 fix bug | * 82685ae <lizheming> 2 年 3 个月前 fix typo | * 1dc08a2 <lizheming> 2 年 3 个月前 fix typo | * b5f5d7a <lizheming> 2 年 3 个月前 增加 ${HOSTNAME} 注入 | * 57e0681 <lizheming> 2 年 3 个月前 更新日志位置 | * ae6b865 <lizheming> 2 年 6 个月前 update think-logger 版本 * | 9ab1663 <linxd> 2 年 2 个月前 更新https的ssl证书 |/ * 6a54234 <linxd> 2 年 6 个月前 remove @2017 </syntaxhighlight>|$|/home/kangkk}} == 配置文件 == === .gitconfig === {{Hc|.gitconfig|<syntaxhighlight lang="text"> [user] name = kangjian email = kangjian@360.cn [alias] l = log --oneline --graph</syntaxhighlight>}} === .gitignore ===
此页面嵌入的页面:
模板:Hc
(
查看源代码
)
模板:Hc/style.css
(
查看源代码
)
模板:Shc
(
查看源代码
)
模板:Shc/style.css
(
查看源代码
)
模板:Shc out
(
查看源代码
)
模板:Shc out/style.css
(
查看源代码
)
返回
Git/配置
。
导航菜单
康健生活
搜索
user-page
通知
user-interface-preferences
个人工具
登录
五一
多读书,多运动,多到远处走走,再看看不一样的世界。