Git Remotes: Fun Commands You Can Use
来源:互联网 发布:java list排序最快方法 编辑:程序博客网 时间:2024/05/17 08:50
Git Remotes: Fun Commands You Can Use
Commands discussed in this section:
- git branch
- git remote
- git ls-remote
- git fetch
- git pull
List remote-tracking branches
$ git branch -r origin/HEAD -> origin/master origin/master origin/test qa/master qa/test
List all branches:
$ git branch -a* master remotes/origin/HEAD -> origin/master remotes/origin/master remotes/origin/test
List only local, working branches:
$ git branch* master
Show basic information about the default remote
$ git remote -vorigin file:///home/gitadmin/project1.git (fetch)origin file:///home/gitadmin/project1.git (push)
Show a lot about a remote
$ git remote show origin* remote origin Fetch URL: file:///home/gitadmin/project1.git Push URL: file:///home/gitadmin/project1.git HEAD branch: master Remote branches: master tracked test tracked Local branch configured for 'git pull': master merges with remote master Local ref configured for 'git push': master pushes to master (up to date)
Dig around remote repositories
Show the references in a remote repository and their hash:
$ git ls-remote origin8dc59a3c60b5dd12605d0a647b4921b5410b820f HEAD8dc59a3c60b5dd12605d0a647b4921b5410b820f refs/heads/mastera402bc61da05d2c9dc6dc6307dcffe12a1fb8045 refs/heads/test$ git ls-remote git://git.debian.org/collab-maint/usplash.gitee17d863ceab06e408e8b051244b7202ae4075f7 HEADee17d863ceab06e408e8b051244b7202ae4075f7 refs/heads/masterf0847d378161de510b49654746f551482240901f refs/heads/upstream7f5b189dc1c67bb5ff33ca2d4f616336baa8fb4c refs/tags/0.5.19-1...
The first example, refers to a remote repository named origin and the second above specifies the completely URL of the remote repository.
Add a remote repository
$ git remote add qa git://qaserver/round1$ git fetch qaFrom git://qaserver/round1 * [new branch] master -> qa/master * [new branch] test -> qa/test
Add a tracking branch
$ git branch --track test origin/testBranch test set up to track remote branch test from origin.$ git checkout test$ git pull ...
- Git Remotes: Fun Commands You Can Use
- Some basic git commands that you will use usually
- git remotes
- Databases are fun, Until you use them...
- How You Can Use RSS
- Databases you can use for benchmarking
- Can you use map and set???
- Can you use map and set???
- fun cmd commands
- Commands 4 Fun
- 百度云环境提交git错误:You can't add/del workspace by yourself, use platform please
- Tips You Can Use To Improve Your Memory
- How can you decide to use UINavigationBar, UIToolbar and UITabbar
- how to tell if you can use kvm
- Can you use XCode6 with IOS7.1 SDK
- Time Series Graphs & Eleven Stunning Ways You Can Use Them
- git commands
- Git commands
- Matches Game(P2234)
- jquery.validate.js
- 十三周报告三
- Android中Cursor类的概念和用法
- ibatis error
- Git Remotes: Fun Commands You Can Use
- 谷歌盲人科学家T.V.拉曼(T.V.Raman)
- 第十三周任务(三)
- RESTful风格
- JavaMai——邮箱验证用户注册
- 第13实验报告4
- Mathematica图像操作基础
- 10年的程序员生涯总结
- nginx源码分析—hash结构ngx_hash_t(v1.0.4)