博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Git Personal Manual
阅读量:7080 次
发布时间:2019-06-28

本文共 962 字,大约阅读时间需要 3 分钟。

Preface

其实工作中很常用git了,但是对其概念、命令的使用更多的是被动使用,而不是主动理解。

希望自己每周的学习总结,可以促使自己更多的思考、总结、好奇、学习、成长~

Introduction

分布式版本控制。

但在实际使用时有一个集中机器,交换大家的修改。

Basic Concept

HEAD 指向当前版本

stage 暂存区

working directory 工作区

Basic Command

基本

  • git init
  • git status
  • git add
  • git rm
  • git commit -m 'message'
  • git reset --hard commit_id / git reset --hard HEAD 暂存区到工作区
  • git log 历史版本
  • git reflog 未来版本
  • git checkout --file 撤回工作区内容
  • git diff HEAD --file

分支

  • git branch
  • git checkout -b branch
  • git branch -d
  • git merge branch

远端

  • git remote -v
  • git push -u origin master
  • git pull origin master --rebase

暂存

  • git stash list
  • git stash 存储working directory & stage
  • git stash pop

patch

  • git diff > patch
  • git apply patch 事务性操作,要么全成功、要么全失败
  • git format-patch -1 根据节点提交
  • git am patch
  • git apply --reject 0001-BUG-Sybase.patch通过参考.rej文件进行修改,进行 git add
  • git am --resolved

Others

git config --global alias.co checkoutgit config --global alias.ci commitgit config --global alias.br branchgit config --global alias.st status复制代码

Reference

转载地址:http://zcvml.baihongyu.com/

你可能感兴趣的文章
我的友情链接
查看>>
iOS 图片合并 及截图
查看>>
easyui datagrid load 方法键不能为变量的解决
查看>>
分治的一次简单实践
查看>>
博为峰Java面试题-JavaSE I/O之File写入读出
查看>>
USER username (Login failed): Invalid shell: '/bin/false'
查看>>
我的友情链接
查看>>
Linux下整合Apache和Tomcat
查看>>
桌面图标右键选择发送到就会出现卡住假死
查看>>
关于旅行的文章..............搜集
查看>>
golang接口的使用(练习一)
查看>>
linux笔记之DNS服务配置(一)
查看>>
我的友情链接
查看>>
Nginx HTTP负载均衡和反向代理配置
查看>>
Redis 安装(一)
查看>>
nil, Nil, NULL 的区别
查看>>
lsof -i -n -P
查看>>
RocketMQ高并发读写
查看>>
Kali linux上运行quasibot时主页不显示内容的问题
查看>>
CentOS 5.5下搭建Mysql+DRBD+Heartbeat
查看>>