Github Basic Examples
2017-05-06 15:26
211 查看
仅供个人笔记用,记录查询过的代码片断和一些语法,不成系统。随遇随加,为方便修改才置顶。
带星号的就是当前branch
注意,
branch管理
创建branch
git branch new_branch_name
检出branch
git checkout branch_name
创建并检出新的branch
git checkout -b new_branch_name
查看当前branch
git branch
带星号的就是当前branch
查看远程branch
git branch -r
查看所有branch
git branch -a
删除本地branch
git branch -D branch_name
删除远程branch
git push origin --delete branch_name
修改branch 名字
git branch -m old_name new_name
提交branch
git add . --all git commit -m 'comment here' git push -u origin branch_name
注意,
-u参数只在提交新分支时使用
合并branch
假设要合并b1与
b2
git checkout b1 git merge b2
查看提交历史
查看某一个文件的详细提交记录
git log -p filename
查看目前的每一行是哪个提交最后改动的
git blame filename
相关文章推荐
- 15 Basic ‘ls’ Command Examples in Linux
- 10 basic examples of Linux ps command
- github basic usage in windows
- Three.js Basic examples(1)
- Examples of well coded cocoa iPhone apps on github
- JUnit – Basic annotation examples
- Shell Basic Examples
- 15 Basic ‘ls’ Command Examples in Linux
- 10 basic examples of linux netstat command
- Vim Basic Examples
- basic examples of linux netstat command
- 15 Basic ‘ls’ Command Examples in Linux
- 13 Basic Cat Command Examples in Linux
- https://github.com/chenghuige/tensorflow-exp/blob/master/examples/sparse-tensor-classification/
- github basic usage in windows
- Python Basic Examples
- GSL Matrix and Vector Basic Operations Examples
- C++ Basic Examples
- linux_13 Basic Cat Command Examples in Linux
- Basic chkconfig Command Examples in Linux