GIT NOTE

作者: Nico酱 | 来源:发表于2017-09-30 14:50 被阅读23次

1.查看提交记录git log 常用:git status

2.版本回退上个版本 git resest --hard HEAD^

3.工作区的修改撤销 git checkout -- file

4.删除 git rm file 然后再commit

5.第一次推送时加上-u git push -u origin master

6.创建分支 git checkout -b dev 查看分支git branch 删除分支git branch -d dev

7.合并 git merge dev

8.储存现场 git stash 恢复现场git stash list

一是用git stash apply恢复,但是恢复后,stash内容并不删除,你需要用git stash drop来删除;

另一种方式是用git stash pop,恢复的同时把stash内容也删了:

相关文章

  • Git 常用命令

    Git Note 提交到版本库 git add . -> git commit -m "msg" git comm...

  • Git remove untracked files

    git-clean[https://git-scm.com/docs/git-clean]Note that th...

  • Git note

    note 参照 廖雪峰 的blog 初始一个 git 使用 git init 添加一个文件到git 库里 1. g...

  • GIT NOTE

    1.查看提交记录git log 常用:git status 2.版本回退上个版本 git resest --h...

  • Git Note

    branch rename git rebase

  • Git Note

    创建Git项目 创建仓库目录mkdir dir 初始化仓库git init Git文件管理 把文件加入仓库git ...

  • Using Beyond Compare with Versio

    Git 2.3 and newer (Note: Use bc3 on the command line for...

  • notecloud

    搭建note 1 --初始环境,启动容器 在服务器家目录拉取mynote代码: git clone git@git...

  • Note For Git(Updating)

    发现一个book 参考链接:http://gitbook.liuhui998.com/index.html fat...

  • git study note

    What's the backup after mis-pulled remote data to your lo...

网友评论

      本文标题:GIT NOTE

      本文链接:https://www.haomeiwen.com/subject/ypogextx.html