git 操作雜記

分支基本操作(branch)

git branch 列出所有本地端的 branch。 git branch -r 列出所有遠端的 branch。 git branch -a 列出所有本地及遠端的 branch。

參考資料:(https://gogojimmy.net/2012/02/29/git-scenario/)

git remote -v
origin  git@github.com:USERNAME/REPOSITORY.git (fetch)
origin  git@github.com:USERNAME/REPOSITORY.git (push)

git remote set-url origin https://github.com/USERNAME/REPOSITORY.git

git remote -v
# Verify new remote URL
origin  https://github.com/USERNAME/REPOSITORY.git (fetch)
origin  https://github.com/USERNAME/REPOSITORY.git (push)

參考資料:(https://help.github.com/articles/changing-a-remote-s-url/)

Last updated