您的位置:首页 > 其它

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分支
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  git