git下载安装此处不谈:
配置用户名和邮箱:
windows环境可以直接通过修改配置文件:
linux下:
配置用户名和邮箱:
$ git config --global user.name "Your Name"
$ git config --global user.email "email@example.com"
查看当前用户信息以及其他的一些信息
$ git config --list
core.excludesfile=/Users/mac/.gitignore_global
difftool.sourcetree.cmd=opendiff "$LOCAL" "$REMOTE"
difftool.sourcetree.path=
mergetool.sourcetree.cmd=/Applications/SourceTree.app/Contents/Resources/opendiff-w.sh "$LOCAL" "$REMOTE" -ancestor "$BASE" -merge "$MERGED"
mergetool.sourcetree.trustexitcode=true
http.postbuffer=524288000
https.postbuffer=524288000
user.email=你的邮箱@qq.com
user.name=你的用户名
macdeMacBook-Pro:~ Artron_LQQ$
建立本地git仓库(很少用到,暂时不谈)
1.拉取最新代码:
$ git pull origin master
warning: no common commits
remote: Counting objects: 3, done.
remote: Total

这篇博客介绍了Git的基本操作,包括配置用户名和邮箱、拉取最新代码、查看和切换分支、提交修改、解决冲突以及推送代码到远程仓库。在提交过程中详细说明了如何使用vim编辑器修改提交信息,并提供了相关命令的使用方法。
最低0.47元/天 解锁文章
1053

被折叠的 条评论
为什么被折叠?



