Skip to content

Instantly share code, notes, and snippets.

@PhyrexTsai
Created May 24, 2016 06:09
Show Gist options
  • Save PhyrexTsai/1dc7732bcf01207914cec6d09d4b23a9 to your computer and use it in GitHub Desktop.
Save PhyrexTsai/1dc7732bcf01207914cec6d09d4b23a9 to your computer and use it in GitHub Desktop.

Git

3-way-merge

這邊需要透過在 merge 階段整合部分資訊

--

Fast forward

自己先把所有的改動用 rebase 方式把資料都堆疊上去

--

Commit

先加入遠端 repo 位置

git remote add upstream {your_source}  
git remote -v

更新步驟:

git fetch upstream
git checkout {master}
git merge {upstream/master}

上傳的步驟:

git checkout {myworkbranch}
git rebase {master}
git checkout {master}
git merge {myworkbranch}
git push {origin} {myworkbranch}

再 github origin 發 pull request

--

Stash

用來暫存目前改動的資訊

git stash

顯示目前所有 stash 的清單

git stash lista

將 stash 資訊取出來用

git stash pop {key}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment