#配置
git config --global user.name "Your Name"
git config --global user.email "email@example.com"
#注意git config命令的--global参数,用了这个参数,表示这台机器上所有的Git仓库都会使用这个配置,当然也可以对某个仓库指定不同的用户名和Email地址。
#cd到目录,初始化
git init
#把文件添加到暂存去
git add file.py
#把暂存去的内容提交到当前分支
git commit -m '这里是说明'
#获得密钥,并添加到git(网页)
ssh -keyggen -t rsa -C 'iwangzhch@gmail.com'
#检测密钥是否添加成功
ssh -T git@git.oschina.net
#添加远程库
#需要现在git.oschina.net中已经存在
git remote add origin git@git.oschina.net:wangzc/code.git
#或者用以下方法(https) 有可能要加端口
git remote add origin git@https://git.oschina.net/wangzc/code.git
#把本地仓库推送到远程库 第一次 -u 强制推送 +master
git push origin master
#从远程库克隆
git clone
#查看修改
git log --pretty=oneline
#退回到上一个版本
git reset --hard HEAD^
#回到未来
git relog
#删除文件
git rm file
#远程库更改地址
git remote set-url origin the_new_url
#查看远程库
git remote
#查看远程库信息
git remote show origin

最新文章

  1. 用Open Live Account写博文的第一篇文章,立个flag
  2. html和text的区别
  3. Thinkphp 获取当前url
  4. 我是一块cpu 《转载》
  5. HDU 5040 Instrusive(BFS+优先队列)
  6. 《第一行代码》学习笔记39-服务Service(6)
  7. js修改样式表规则
  8. 安装supervisor
  9. java基础学习周计划之1--语言基础
  10. pytest 12 函数传参和fixture传参数request
  11. linux 下oracle导入dmp文件
  12. day2-安装python以及基本使用
  13. JDBC执行SQL语句以及Date对象和字符串之间的相互转换(关键是那张标准表)
  14. Android 音视频深入 二 AudioTrack播放pcm(附源码下载)
  15. 火狐浏览器firebug
  16. spring mvc 解决json 不能转换的问题
  17. oracle查找特定表的引用
  18. php添加mongo模块
  19. ubuntu16.04安装oracle常见问题
  20. django “如何”系列10:如何管理静态文件

热门文章

  1. codeforces736D. Permutations(线性代数)
  2. WORD操作的问题
  3. jquery.qrcode.min.js生成二维码
  4. 打开一个本地apk进行安装
  5. c语言中的->代表什么意思
  6. log explorer使用的几个问题[转载]
  7. MySQL主从复制原理介绍
  8. solr scheme配置简介
  9. Sql Server 自动备份
  10. ueditor中FileUtils.getTempDirectory()找不到