merge a git branch into master

git 開分支很快,透過 git branch 就可以了,切換 local 和 server 上的  branch 是使用 git checkout, 有分支總有一天會需要匯回master, 合併的指令如下:

git checkout master
git pull origin master
git merge test
git push origin master

If I have a local branch from a remote one, I don’t feel comfortable with merging other branches than this one with the remote. Also I would not push my changes, until I’m happy with what I want to push and also I wouldn’t push things at all, that are only for me and my local repository. In your description it seems, that test is only for you? So no reason to publish it.

git always tries to respect yours and others changes, and so will --rebase. I don’t think I can explain it appropriately, so have a look at the Git book – Rebasing or git-ready: Intro into rebasingfor a little description. It’s a quite cool feature




Git 分支 – 分支的新建與合併


How do I update a GitHub forked repository? 同步分出來的分支





獅尾加糖宋體基於思源宋體的橫筆加粗改造。支援简体中文、繁體中文、韓文與日文。 檔案下載: 測試 […]

Read More

在Genymotion的Android模擬器上安裝Google Play

由於玩的手機遊戲,需要分身送禮物,又只有一台手機,解法是用電腦開模擬器來送,如果是Windows 平台可以安裝 BlueStacks 但我家裡一台 Windows 的電腦 […]

Read More


在網路上隨手買了一本電腦書給弟弟,滿便宜的399,超商取貨省下很多往返書局的時間。設定環境和PyCharm我先先幫他設好,等他未來有空再自己去摸索。今天學了運算子,變數, […]

Read More


發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *