摘要: 初始化初始化本地空版本库,仓库,英文名repositorymkdir test && cd testgit init克隆项目到本地git clone 远程同步操作关联远程仓库和本地仓库git remote add 提交本地仓库到远程仓库git push [... 阅读全文
posted @ 2018-12-10 10:01 xuejianbest 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 工作区为实际操作的目录版本库为.git目录。Git的版本库又被称为stage(或index)的暂存区,还有Git为我们自动创建的第一个分支master,以及指向master的一个指针HEAD。add会把工作区的修改更新到暂存区commit会把暂存区的内容更新... 阅读全文
posted @ 2018-12-10 10:01 xuejianbest 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-12-10 10:01 xuejianbest 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 一、设置git的user name和email,用于提交时候标识身份$ git config --global user.name "name"$ git config --global user.email "name@mail.com"二、生成密钥ssh... 阅读全文
posted @ 2018-12-10 10:00 xuejianbest 阅读(1371) 评论(0) 推荐(0) 编辑
摘要: 显示颜色:git config --global color.ui true配置别名:git config --global alias.st status #用git st代替git statusgit config --global alias.last... 阅读全文
posted @ 2018-12-10 10:00 xuejianbest 阅读(445) 评论(0) 推荐(0) 编辑
摘要: 文件内容示例:# Windows:Thumbs.dbehthumbs.dbDesktop.ini# Python:*.py[cod]*.so*.egg*.egg-infodistbuild# My configurations:db.inideploy_ke... 阅读全文
posted @ 2018-12-10 10:00 xuejianbest 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 初始化远程仓库:adduser -s /usr/bin/git-shell -d /home/git -m git # 创建git用户。centos下adduser是useradd的软连接文件。 # -m 同时创建家目录/home/git。# -s 指定用户... 阅读全文
posted @ 2018-12-10 10:00 xuejianbest 阅读(85) 评论(0) 推荐(0) 编辑
摘要: github: https://github.com码云: https://gitee.com支持MathJax,但是有bug,反馈了根本没人理。BUG详情见:https://gitee.com/xuejianbest/pencoding: https://... 阅读全文
posted @ 2018-12-10 10:00 xuejianbest 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 用git commit进行了一次版本提交,并推送到了远程仓库,若是想修改此次提交者用户名邮箱可以这样操作:git commit --amend --author="newname " #丢弃上一次版本提交,然后进行一次同上次一样的新版本提交(两次提交的com... 阅读全文
posted @ 2018-12-10 09:59 xuejianbest 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 优秀的Git commit信息遵循的七个规则:用一个空行分开主题与正文限制主题行到50个字符主题行用大写字母开头主题行末尾不要用句号主题行要用祈使语气正文要在72个字符处时换行用正文解释what 和 why 而不是how 阅读全文
posted @ 2018-12-10 09:59 xuejianbest 阅读(433) 评论(0) 推荐(0) 编辑