[git] HOWTO-work with git
来源:互联网 发布:免费手机短信群发软件 编辑:程序博客网 时间:2024/06/13 19:25
查看版本号
cat .git/refs/heads/cn/develop
添加一个远程地址
git remote add
显示所有的远程地址
git remote -v
查看远程服务端
git remote show origin
创建新分支并追中远程地址中的分支
git checkout --track remoteaddr/remotebranch
等同于git checkout -b remotebranch remoteaddr/remotebranch
创建不相同的分支并追踪远程分支
git checkout -b SF/rc --track us/rc
显示追踪情况
git remote show origin
创建远程端
以head的内容在远程创建newbranch
git push origin head:newbranch
git push origin head:feature/newbranch
删除远程端.
以空内容在覆盖远程newbranch
git push origin :newbranch
git push origin --delete path1/path2
单独提交某个分支
git push origin cn/porting/rc_clean
---------------TAG START----------------
本地创建TAG
git tag -a SOMETAG -m "create tag for SOMEREASON"
本地查看TAG
git tag -l
PUSH TAG到服务器
git push --tags
删除本地TAG
git tag -d TAG
checkout tag
git checkout SOMETAG, git checkout -b SOMETAG.
----------------TAG END------------------
----------------MERGE--------------------
merge经常会出现太多conflict甚至显示不全的时候, 这个时候
git config --list
查找 diff.renamelimit=0的设置
git config diff.renamelimit=13191
----------清理----------
删除 # 开头 含有Trans的没有版本管理里的文件, !!!!慎用!!!!!
git status | grep '#' | grep 'Trans' | cut -b 2,3- | xargs rm -r
- [git] HOWTO-work with git
- [git] HOWTO work with git flow
- Web Material about Git – how to work with git
- git work flow
- Git系列 --- git-dir & work-tree
- /howto-configure-msmtp-to-work-with-gmail-on-linux
- HOWTO: Setup XCode 6.1 to work with OpenCV3 libraries
- 【Git】git reset (repo->index) git checkout (index->work)
- HOWTO-GIT-create a patch and appl
- Sharing repository with GIT
- git diff with meld
- Unity3D with git
- Squash Commits with Git
- Using git with proxy
- git clone with proxy
- Working with Git
- Git with TeamWork
- Azure deploy with git
- 最长上升子序列(LIS)&最长公共子序列(LCS)
- 前端禁止多次重复提交表单
- 妙用Windows“运行”
- IE8上传文件时文件本地路径变成"C:\fakepath\"的问题
- SQL效率(下)
- [git] HOWTO-work with git
- 外表刚强的人常容易放弃,因为怕输
- 程序员是否可以在家办公——在家办公的利与弊
- static class 静态类(Java)
- Python print函数用法,print 格式化输出
- 解决问题crosses initialization of char
- vs2012 Boost库的使用
- 蓝牙技术
- ps怎么把图层置入图层,就像cdr的置入容器一样。如图有个向下的小箭头的