-
Notifications
You must be signed in to change notification settings - Fork 4
git相关
my git hub:
git config --global user.email email
git config --global user.name name
1.1.git pull origin dev(更新本地代码)->
1.2.git branch dev_fun_name(本地建立本地分支用于开发新代码) ->
1.3.begin to devlope(开始开发)->
1.4.merge dev_fun_name to local dev(开发完成后将本地分支merge到本地dev) ->
1.5.git add . ; git commit -a -m "xxx"; (提交到本地)->
1.6.git pull origin dev(重新更新最新的远程dev code到本地)->
1.7.git status; git checkout xxx; (pull后如果有冲突要解决,如果有不是自己改动过的code需要用checkout踢出)->
1.8.push local dev to gerrit(将本地dev code提交到gerrit让第三人review)->
1.9.complete review code(第三人在gerrit上review通过后标识cr,v)->
1.10.auto push to dev(只有当code在gerrit上review通过后,code才会被gerrit自动push到origin dev) ->
1.11.git tag(对远程origin dev code打包) ->
1.12.give tag-name to qa to test(将远程的tag包名提供给qa,部署到stage环境测试)->
1.13.stage测试通过后上线。
$git clone git@github.com:WadeLeng/hello-world.git
$git fetch origin //获取远程更新
$git merge origin/master //把更新的内容合并到本地分支
git pull
git commit -a -m "" //submit code to local git rep
-a: add files
-m: add comment
-a 和 -m必须都有
git push <远程主机名> <本地分支名>:<远程分支名>
git push origin develop:develop
git push newbranch_name master //git 合并分支到远程。
git branch -r
git checkout -b tzb_20140630_newspace remotes/origin/tzb_20140630_newspace
git merge origin/develop
9.1.git branch hepengyuan
9.2.git merge master
git branch 分支名,例如:git branch branch_abc
git push origin HEAD:refs/for/dev
git diff
843 git log
844 git reset ef93c2d239f98195e6835b427f6fb14ae0e754cd
845 git diff
846 git stash
847 git pull
848 git stash pop
849 git commit -a -m "message"
850 git push origin HEAD:refs/for/dev
tag -p up_user -n express_bug
git tag
参考好文:http://blog.csdn.net/hudashi/article/details/7664631
git branch -d
git reset --hard HEAD
git pull origin remote_branch_name:local_branch_name
git fetch origin remote_branch_name:local_branch_name
git ls-remote --tags
git fetch --tags origin refs/tags/v3.2.6:localhost_tag_v3.2.6
git clone -b branchName yourProject