git 常用命令
2016-10-10 23:01
120 查看
init
usage: git init [-q | –quiet] [–bare] [–template=] [–shared[=]] []--template <template-directory> directory from which templates will be used --bare create a bare repository --shared[=<permissions>] specify that the git repository is to be shared amongst several users -q, --quiet be quiet --separate-git-dir <gitdir> separate git dir from working tree
git clone
git clone <版本库的地址> 从版本库地址克隆工程到当前目录git clone <版本库的地址> [本地目录名] 从版本库地址克隆工程到指定的本地目录
git push
git push [远程名] [本地分支名]:[远程分支名] 将本地分支推送至远程名下的远程分支名git push origin master:Test 将本地master分机推送到origin下的Test分支下,若origin无Test分机则创建Test分支
git push origin :Test 将删除origin下的Test分支