git常用命令收集
2014-04-07 10:01
351 查看
[git远程操作命令]
1.
2.$git remote add test1 http://test1.js #添加地址为http://test1.js 别名为test1的远程仓库
3.$git fetch pb #抓取服务器上的所有别人提交的直接没有的内容
4.$ git push origin master #向别名为origin的远程服务仓库推送分支为master的内容
5.$git remote rename pb paul #把远程服务器的别名pb更改为paul,默认第一个别名是origin
[git配置文件操作命令]
1.git config add user.name z****haiyu #配置给配置文件添加新的属性
2.git config --unset core.excludesfile #取消git的参数配置
3.git config –list #显示所有的配置
4.git config #查看跟多的config相关操作的命令
1.
$ git remote –
v #查看本地配置的所有远程仓库,内容为远程仓库的地址和本地别名
harvey@harvey:~/node$ git remote -v nodejs https://github.com/******/nodejs.git (fetch) nodejs https://github.com/*******/nodejs.git (push)
2.$git remote add test1 http://test1.js #添加地址为http://test1.js 别名为test1的远程仓库
harvey@harvey:~/node$ git remote add test1 http://test1.js harvey@harvey:~/node$ git remote -v nodejs https://github.com/zhanghaiyu/nodejs.git (fetch) nodejs https://github.com/zhanghaiyu/nodejs.git (push) test1 http://test1.js (fetch) test1 http://test1.js (push)
3.$git fetch pb #抓取服务器上的所有别人提交的直接没有的内容
$ git fetch pb remote: Counting objects: 58, done. remote: Compressing objects: 100% (41/41), done. remote: Total 44 (delta 24), reused 1 (delta 0) Unpacking objects: 100% (44/44), done. From git://github.com/paulboone/ticgit * [new branch] master -> pb/master * [new branch] ticgit -> pb/ticgit
4.$ git push origin master #向别名为origin的远程服务仓库推送分支为master的内容
harvey@harvey:~/node$ git push -u origin master Username for 'https://github.com': zhanghaiyu Password for 'https://zhanghaiyu@github.com': Counting objects: 10, done. Delta compression using up to 2 threads. Compressing objects: 100% (8/8), done. Writing objects: 100% (10/10), 972 bytes | 0 bytes/s, done. Total 10 (delta 2), reused 0 (delta 0) To https://github.com/zhanghaiyu/nodejs.git * [new branch] master -> master Branch master set up to track remote branch master from origin.
5.$git remote rename pb paul #把远程服务器的别名pb更改为paul,默认第一个别名是origin
$ git remote rename pb paul $ git remote origin paul
[git配置文件操作命令]
1.git config add user.name z****haiyu #配置给配置文件添加新的属性
harvey@harvey:~/node$ git config core.excludesfile ~/node/.git/info/exclude #添加忽略文件
2.git config --unset core.excludesfile #取消git的参数配置
harvey@harvey:~/node$ git config --unset core.excludesfile
3.git config –list #显示所有的配置
4.git config #查看跟多的config相关操作的命令
相关文章推荐
- FDDI即光纤分布式数据接口
- win7下每次打开Excel2007都提示向程序发送命令
- html5实现的盲打高手游戏代码
- C++ 智能指针详解
- sql 错误提示
- 沿线路等间距分幅输出分布图
- Apache Cordova App Reloader
- MinGW下载地址
- C++ 智能指针Auto_PTR 分析
- SQL语句大全(转载)
- 分布式数据库技术
- GoldenGate学习之旅-4(添加表级别的补充日志)
- LeetCode (Gas Station)
- 分布式大规模数据处理
- 泛型
- 财经法规复习三-2
- hdu-2524-矩形A + B
- SharePoint品牌化和自定义--第二章节--用户体验品牌化过程概览(1)--4Ds
- [hdu 2016] 数据的交换输出
- 文件很少被删减或者覆盖