Git总结1
来源:互联网 发布:帝国cms阿里云oss插件 编辑:程序博客网 时间:2024/06/02 19:32
获取远程库到本地库
xiongmc@xiongmc-desktop:~/project$ git clone git@172.21.20.95:Home
Cloning into 'Home'...remote: Counting objects: 88, done.
remote: Compressing objects: 100% (77/77), done.
remote: Total 88 (delta 30), reused 0 (delta 0)
Receiving objects: 100% (88/88), 211.13 KiB, done.
Resolving deltas: 100% (30/30), done.
进入项目主目录
xiongmc@xiongmc-desktop:~/project$ cd Home/xiongmc@xiongmc-desktop:~/project/Home$ git branch
* master
创建开发分支
xiongmc@xiongmc-desktop:~/project/Home$ git branch htt_app_home_20130726
切换到开发分支
xiongmc@xiongmc-desktop:~/project/Home$ git checkout htt_app_home_20130726Switched to branch 'htt_app_home_20130726'
查看当前分支
xiongmc@xiongmc-desktop:~/project/Home$ git branch* htt_app_home_20130726
master
# On branch htt_app_home_20130726
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .project
# bin/
nothing added to commit but untracked files present (use "git add" to track)
#更新项目以便适合于当前环境 ,进入开发阶段。
xiongmc@xiongmc-desktop:~/project/Home$ android update project -p . -t android-17Updated and renamed default.properties to project.properties
Updated local.properties
No project name specified, using project folder name 'Home'.
If you wish to change it, edit the first line of build.xml.
Added file ./build.xml
Added file ./proguard-project.txt
xiongmc@xiongmc-desktop:~/project/Home$ git status# On branch htt_app_home_20130726
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .project
# bin/
# build.xml
# local.properties
# proguard-project.txt
# project.properties
nothing added to commit but untracked files present (use "git add" to track)
查看当前状态
xiongmc@xiongmc-desktop:~/project/Home$ git status# On branch htt_app_home_20130726
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: res/layout-land/home.xml
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .project
# bin/
# build.xml
# gen/
# local.properties
# proguard-project.txt
# project.properties
no changes added to commit (use "git add" and/or "git commit -a")
提交开发分支到本地库。这里使用 qgit 做到。
xiongmc@xiongmc-desktop:~/project/Home$ qgitxiongmc@xiongmc-desktop:~/project/Home$ gitk
xiongmc@xiongmc-desktop:~/project/Home$ git status
# On branch htt_app_home_20130726
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .project
# bin/
# build.xml
# gen/
# local.properties
# proguard-project.txt
# project.properties
提交本地库到远程库,以便管理代码,共其他开发人员使用(或发布最终用户)
xiongmc@xiongmc-desktop:~/project/Home$ git push origin hht_app_home_20130726:master
1) 先把git的东西fetch到你本地然后merge后再push
$ git fetch
$ git merge
这2句命令等价于
$ git pull
- Git总结1
- git命令总结1
- git学习总结(1)初识git
- git使用错误总结1
- git常用命令总结(1)
- 【Git】Git常用命令总结
- Git:Git常用命令总结
- 【Git】Git常用命令总结
- git:总结git常用命令
- git 总结
- git 总结
- Git总结
- Git 总结
- git 总结
- git总结
- GIT总结
- git 总结
- git 总结
- Velocity学习3之整合servlet
- java反射之Class类、构造器、方法、字段、数组
- 出界的概率
- SVN服务器搭建和使用(三)
- 如何实现自定义格式字符串的输出
- Git总结1
- oracle数据库优化
- Python学习笔记系列(二):安装第三方软件库(Windows)
- TortoiseSVN客户端重新设置用户名和密码
- 游戏服务器后台的快速开发之升级
- 如何用正则将多个空格看成一个空格结合spllit()方法将文本数据入库
- UVa:369 Combinations
- SPOJ MARBLES(简单组合)
- SPOJ 78 Marbles