Sunday, January 5, 2014

develop log–simple git log 简单使用日志

1.init environment

-- 初始化

1.1 init

-- 初始化

git init



1.2 clone


-- 克隆

git clone ssh://pkrss@pkrss.my.phpcloud.com/gitprojects/container-root.git

2.add git server


2.1add remote depositary


-- 添加远程仓库

git remote add phpcloud ssh://pkrss@pkrss.my.phpcloud.com/gitprojects/container-root.git
git remote add cdsn git@code.csdn.net:pkexa/pkexa.git



2.2 show remote depositary list


-- 查看已添加的远程列表

git remote





2.get code


2.1 pull code


-- 拉代码

git pull phpcloud master



this will get ssh://pkrss@pkrss.my.phpcloud.com/gitprojects/container-root.git depositary master branch.and local depositary name is origin.


-- 它拉取ssh://pkrss@pkrss.my.phpcloud.com/gitprojects/container-root.git 仓库 master 分支.本地仓库名为origin.


2.2 commit to git local cache


-- 将修改的代码提交到本地缓存


git commit –am "change some code log"


2.3 push local cache to server


-- 将本地的缓冲提交到服务器

git push phpcloud master:master

-- or 或者

git push phpcloud master

-- or 或者

git push phpcloud

3.branch -- 分支


3.1 local branch -- 本地


3.1.1 create branch -- 创建分支


create branch 'branch1' --创建分支 'branch1'

git branch branch1



3.1.2 switch branch --切换分支

git checkout branch1



3.1.3 branch list - 分支列表

git branch



3.1.4 branch delete - 删除分支

git branch -d branch1



3.2 remote branch -- 远程分支


3.2.1 create remote branch -- 创建远程分支


this in push,from local master branch to remote phpcloud depositary


-– 在push时操作,将本地的master分支提交到phpcloud仓库的branch1分支上

git push phpcloud master:branch1



3.2.2 branch remote  list - 远程分支列表

git branch –a

3.2.3 branch remote delete - 删除远程分支

git push phpcloud --delete branch1








 


 


4 comments:

rea said...

After I initially commented I appear to have clicked the -Notify me when new comments are added- checkbox
and from now on whenever a omment is added I receive four emails with tthe same comment.
Is there an easy method you are able to rejove me from that service?
Appreciate it!

rea said...

Prettfy section of content. I just stumbled upon your blog and in acxession
capital to assert that I get actualy enjoyed account your blog
posts. Anyway I'll be subscribing to your augment and even
I achievement you access consistently rapidly.

rea said...

Whats up are using Wordpress for your blog platform?I'm new to the blog world but
I'm trying to get started and set up my own. Do you need any
coding expertise to mqke your own blog? Any help would be really appreciated!

Sexercise Workouts said...

I'm not sur exactly why but this weblog is loading icredibly slow for me.
Is anyone else having this isdsue or is it a problem on my end?
I'll check back later annd see if thee problem still exists.