http://gogojimmy.net/2012/01/21/how-to-use-git-2-basic-usage-and-worflow/
嘗試利用 branch .....
現在簡單應用下面的指令
直接由 develop 開出分支 myfeature,並且直接切換過去
git checkout -b myfeature develop
# 直接下 git branch 觀看目前位置
develop
master
* myfeature
# 直接下 git branch 觀看目前位置
develop
master
* myfeature
經過編輯修改並且 commit
git add test.php
git commit -a -m "Add: test.php"
git commit -a -m "Add: test.php"
合併分支:
先切換到 develop
先切換到 develop
$ git checkout develop
Switched to branch 'develop'
Switched to branch 'develop'
利用 –no-ff 合併分支(稍後說明為什麼使用 –no-ff)
$ git merge --no-ff myfeature
Merge made by recursive.
test.php | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
create mode 100644 test.php
Merge made by recursive.
test.php | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
create mode 100644 test.php
沒有留言:
張貼留言