git/svn 指令速查

git clone <url> <folder> 設定 git repo
git checkout -B <branch> 建一個新的 branch
git branch 列出 branch 資訊
git branch <branch> 切換至新的 branch
git add <path/to/file> 將檔案加至 working branch
git rm <path/to/file> 刪除檔案
git checkout — <path/to/file> 放棄對檔案的修改
git stash 把未 commit 的 change 暫時塞到一邊,搭配 git stash drop 可用於整批放棄

git svn clone -r HEAD <svn_depo_url> folder 設定 git-svn depo
git svn fetch -r HEAD 抓取 svn repo 內容
git svn rebase 同步 svn/git

Last Update: Tuesday, October 4th, 2011

舊文索引

站內管理