Some frequent operation of the git
来源:互联网 发布:av马赛克去除软件mac 编辑:程序博客网 时间:2024/05/21 19:38
- delete the modification of the workspace:
git checkout -- <filename>
- hard roll back the code version,it will not store your modification:
git reset --hard <commit id>
- soft roll back the code and will take your modification to the workspace:
git reset --mixed <commit id>
- roll back the remote branch:
##First make you local branch to the node you want,then push force to the remotegit reset --hard <commit id>git push origin HEAD --force
- create a new local branch:
git checkout -b <local branch name>
- create a remote branch with the same name of the local:
git push origin <your Branch Name>:<your Branch Name>
- set the up-stream of the branch:
git branch --set-upstreamto=<remote branch name>
- roll back some file to a node you want:
git checkout <commit id> -- <file1/to/restore>
阅读全文
0 0
- Some frequent operation of the git
- the operation of recursion
- Some note of git using
- Some goals of the year
- some of the List of Reports
- Review some key points of Git
- Some best practices for the Git
- Some of the most common web site
- Get some information of the file
- Decipher the internal structure of some webpage
- 2. Some scripts of the turtlebot(python)
- Redis | Recode some of the mistakes
- The operation order of instance creation
- The art in general operation of linux
- The art in general operation of Windows
- 【MonogoDB】The high update operation of MongoDB
- Restore the operation of linux rm -rf
- the basic operation of sequence in python
- vue.js学习资源大全
- 一些常用的设计模式(装饰者模式)
- java算法之动态规划基本思想以及具体案例
- 关系型数据库和非关系型数据库的区别?
- 标志坏的扇区,强迫不让文件系统写入
- Some frequent operation of the git
- iMindMap在教学中的实际应用
- C++进阶—>friend
- 第三方类库-Core核心库-Apache Commons Lang-1
- Lucene&全文检索
- java 使用webmagic 爬虫框架爬取博客园数据存入数据库
- win10系统很快自动休眠的解决方法
- Instruments 中 Core Animation优化(二)
- 写一个单例