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 使用 #1

Open
jinhailang opened this issue Sep 6, 2017 · 0 comments
Open

git 使用 #1

jinhailang opened this issue Sep 6, 2017 · 0 comments
Labels

Comments

@jinhailang
Copy link
Owner

git 使用

  • git merge --abort

    放弃当前正在进行的合并,深陷冲突无法自拨时使用,可以跳出来重新来过。

  • git fetch <远程主机名>

    一旦远程主机的版本库有了更新(Git术语叫做commit),需要将这些更新取回本地,这时就要用到,对你本地的开发代码没有影响。

  • git pull <远程主机名> <远程分支名>:<本地分支名>

    例如:git pull origin next:master,取回远程主机某个分支的更新,再与本地的指定分支合并。

  • git branch -b feature

    在本地创建分支feature并切换到该分支,使用该命令之前应先使用 git fetchgit pull,使当前项目到最新版。

  • git push origin feature/tests

    将本地分支feature推送到远程,分支名为tests

  • git branch -d feature

    删除本地分支feature,可以使用git push origin /tests删除远程分支tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant