Git Instructions -- I

- 1 min

Ref: 删除远程分支新建分支与合并分支管理fork的仓库与原仓库保持同步远程仓库的使用

分支相关操作

git branch
git branch -a
git branch -v
git checkout -b [new-branch-name]

相当于两条命令:

git branch [new-branch-name]
git checkout [new-branch-name]
git checkout [branch-name]
git push origin --delete [remote-branch-name]
git branch -d [branch-name]

fork的仓库与原仓库保持同步

git remote -v
git remote add upstream [repo-address]
git pull upstream master

由此也可以看出完整的push/pull命令应该是:

git push/pull origin/upstream/... [branch-name]
Kaixin Yang

Kaixin Yang

Keep on going.

rss facebook twitter github gitlab youtube mail spotify lastfm instagram linkedin google google-plus pinterest medium vimeo stackoverflow reddit quora quora