git
来源:互联网 发布:电视柜淘宝 编辑:程序博客网 时间:2024/06/05 16:43
参考https://try.github.io/levels/1/challenges/1
git initgit statusgit add '*.txt":所有的包括子文件夹中的txtgit commit -m git pushgit loggit remote add origin https://github.com/try-git/try_git.gitgit pull -u origin master:-u tells Git to remember the parameters.git pull origin mastergit diff HEAD:the diff of our most recent commit, which we can refer to using the HEAD pointer
---staged differences of stage filesgit add octofamily/octodog.txtgit diff --staged:another great use for diffgit reset octofamily/octodog.txt:unstaging octodog.txtgit checkout -- octocat.txt:Files can be changed back to how they were at the last commit---branchgit checkout -b clean_upgit rm '*.txt'git commit -m "Remove all the cats"git checkout mastergit merge clean_upgit branch -d clean_up---git checkout -b new_branchgit pull origin master --rebasegit push origin new_branch
git pull = git fetch +git merge
git pull –rebase = git fetch +git rebase
http://stackoverflow.com/questions/18930527/difference-between-git-pull-and-git-pull-rebase
一个推荐的git流程:http://nvie.com/posts/a-successful-git-branching-model/ ,长期只有master和develop分支,新建一个分支后,merge到master
回滚操作
git log --graph 查看历史版本号git reset --hard hashvaluegit reflog git merge --no-ff hotfix-1.2.1git branch -d hotfix-1.2.1master 分支每个节点都会用版本号打 tag。git tag -a 1.2.1
阅读全文
0 0
- git
- git
- Git
- Git
- Git
- Git
- git
- git
- Git
- GIT
- git
- GIT
- Git
- git
- git
- Git
- GIt
- git
- 谷歌浏览器崩溃
- 欢迎使用CSDN-markdown编辑器
- tomcat中的用户名密码配置以及roles的含义
- 利用R实现简单的BP神经网络
- windbg调试cpu占用率高的进程
- git
- 50个必备的实用jQuery代码段
- ajax 提交表单
- Java进阶之路——从初级程序员到架构师,从小工到专家
- RSA加密解密及RSA签名和验证
- ViewPager 详解(一)——基本入门
- adb shell error:"unknown host service" 多次杀进程无效的解决办法
- oracle修改游标数
- SQL Server2008安装步骤