推送现有git到远程服务器并创建新分支
来源:互联网 发布:淘宝百乐门是什么 编辑:程序博客网 时间:2024/05/02 14:16
yuanwei@huiye:~/cust-repo/7125a-app/device/qcom$ git clone msm7627a testCloning into 'test'...done.yuanwei@huiye:~/cust-repo/7125a-app/device/qcom$ lscommon msm7627a msm7627a_sku1 msm7627a_sku3 testyuanwei@huiye:~/cust-repo/7125a-app/device/qcom$ ls test/7k_handset.kl AndroidBoard.mk BoardConfig.mk init.target.rc recovery_mmc.fstab surf_keypad.kl wpa_supplicant.conf7x27a_kp.kcm Android.mk egl.cfg msm7627a.mk scripts system.prop7x27a_kp.kl AndroidProducts.mk init.qcom.composition_type.sh recovery.fstab surf_keypad.kcm vold.fstab
推送分支
#!/bin/bash#这是我创建服务器端git的一个脚本非常实用。 # create one project read -p " create one input dest dir ignore 8x25:" destecho "starting .................................." ssh -p 29418 gerrithost gerrit create-project 7125a/$destcd $1git init .git branchgit checkout -b gingerbread-qrd-1098-release-r16 git add .git commit -m "add by yuanwei "git push git@192.168.10.91:server/7125a/${dest}.git gingerbread-qrd-1098-release-r16:refs/heads/gingerbread-qrd-1098-release-r16cd -echo "ending .................................."
查看服务器端分支代码
git@huiye:~/server/7125a/device/qcom/test.git$ git branch gingerbread-qrd-1098-release-r16git@huiye:~/server/7125a/device/qcom/test.git$ lsbranches config description HEAD hooks logs objects refsgit@huiye:~/server/7125a/device/qcom/test.git$ cat HEAD ref: refs/heads/master
这个分支并不存 因为我推送的时候直接用的新分支 没有master
git@huiye:~/server/7125a/device/qcom/test.git$ lsbranches config description HEAD hooks logs objects refsgit@huiye:~/server/7125a/device/qcom/test.git$ lsbranches config description HEAD hooks logs objects refsgit@huiye:~/server/7125a/device/qcom/test.git$ lsbranches config description HEAD hooks logs objects refsgit@huiye:~/server/7125a/device/qcom/test.git$ lsbranches config description HEAD hooks logs objects refsgit@huiye:~/server/7125a/device/qcom/test.git$ vim HEAD
修改HEAD 指向我的新分支git@huiye:~/server/7125a/device/qcom/test.git$ cat HEAD ref: refs/heads/gingerbread-qrd-1098-release-r16
如果不修改为红色的分支 则下载后无法checkout
yuanwei@huiye:~/test$ git clone git@192.168.10.91:server/7125a/device/qcom/test.gitCloning into 'test'...remote: Counting objects: 233, done.remote: Compressing objects: 100% (93/93), done.remote: Total 233 (delta 138), reused 233 (delta 138)Receiving objects: 100% (233/233), 55.05 KiB, done.Resolving deltas: 100% (138/138), done.warning: remote HEAD refers to nonexistent ref, unable to checkout.
yuanwei@huiye:~/test$ git clone git@192.168.10.91:server/7125a/device/qcom/test.gitCloning into 'test'...remote: Counting objects: 233, done.remote: Compressing objects: 100% (93/93), done.remote: Total 233 (delta 138), reused 233 (delta 138)Receiving objects: 100% (233/233), 55.05 KiB, done.Resolving deltas: 100% (138/138), done.yuanwei@huiye:~/test$ ls再看效果
yuanwei@huiye:~/test/test$ ls7k_handset.kl AndroidBoard.mk BoardConfig.mk init.target.rc recovery_mmc.fstab surf_keypad.kl wpa_supplicant.conf7x27a_kp.kcm Android.mk egl.cfg msm7627a.mk scripts system.prop7x27a_kp.kl AndroidProducts.mk init.qcom.composition_type.sh recovery.fstab surf_keypad.kcm vold.fstab
- 推送现有git到远程服务器并创建新分支
- Git创建分支并推送到远程服务器
- git在本地创建新分支并推送到远程新分支
- Git创建分支并推送到服务器具体步骤
- git 在本地创建新分支,并且推送到远程分支上
- git分支管理 创建、推送、查看并删除远程分支
- git 查看远程分支、本地分支、创建分支、推送分支到远程repository、获取远程分支、删除本地、远程分支
- git 回滚到指定版本并推送到远程分支
- git 回滚到指定版本并推送到远程分支
- Git创建分支并上传代码到新分支上
- git 获取不到新分支、切换到现有分支
- git 远程分支创建与推送
- git 远程分支创建与推送
- git 远程分支创建与推送
- git 远程分支创建与推送
- git 远程分支创建与推送
- git 分支管理 推送本地分支到远程分支等
- git 分支管理 推送本地分支到远程分支等
- HBase常见问题答疑解惑
- 关于哈希值hashCode()
- concurrent包中Lock相关的知识点整理
- DISTINCT和GROUP BY的区别
- 流年,经不起怀念
- 推送现有git到远程服务器并创建新分支
- HDU 1148
- java Math类的主要函数和常量
- windows下启动mysql服务的命令行启动和手动启动方法
- soap是什么
- Runtime Power Management Framework for I/O Devices
- ——Windows标准控件与QTP Windows对象的对应关系
- 淡淡的微笑,静悄悄地过
- SQLLITE特点总结