Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git 常用命令 #5

Open
OnedayLiu opened this issue Oct 17, 2017 · 0 comments
Open

Git 常用命令 #5

OnedayLiu opened this issue Oct 17, 2017 · 0 comments

Comments

@OnedayLiu
Copy link
Owner

OnedayLiu commented Oct 17, 2017

本地分支关联远程分支 详细

Given a branch foo and a remote upstream:
As of Git 1.8.0:
git branch -u upstream/foo

删除分支 详细

删除本地分支
git branch -d <branch>
强制删除本地分支
git branch -D <branch>
删除远程分支
git push origin --delete <branch>

创建分支

创建并查看 <new-branch>-b 选项是一个方便的标记,告诉 Git 在运行 git checkout <new-branch> 之前运行 git branch <new-branch>
git checkout -b <new-branch>

Tag

git tag <tagname>
  • 将 tag 推送到远程
git push origin <tagname>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant