> git branch * master // 開發主軸事實上是一個叫做 master 的 branch > git branch test // 建立名為 test 的 branch > git branch // 有兩個 branch,目前在 master * master test > git checkout test // 切換到 test 這個 branch Switched to branch 'test' > git branch // 有兩個 branch,目前在 test master * test > git status // 目前在 test 這個 branch # On branch test nothing to commit (working directory clean) > git checkout master // 切換回 master 這個 branch Switched to branch 'master' > git status // 目前在 master 這個 branch # On branch master nothing to commit (working directory clean)Git Branch 就是強在可以在同一個專案裡快速切換 branch。
2013-02-24
Git Branch
Git Branch 是 Git 另外一項狂電其他版本控管系統的功能,因為它實在太輕量了,太簡單用了。
標籤:
git
Git Remote
要跟遠端搭上線有兩種作法:
使用 git clone
- 使用 git clone 從遠端複製既有的專案到本機
- 使用 git remote add 與 git push 將本機的專案送到遠端
使用 git clone
> git clone https://cw1057@bitbucket.org/cw1057/test.git bproject.git Cloning into 'bproject.git'... Password for 'https://cw1057@bitbucket.org': remote: Counting objects: 3, done. remote: Total 3 (delta 0), reused 0 (delta 0) Unpacking objects: 100% (3/3), done.
標籤:
git
2013-02-13
訂閱:
文章 (Atom)