关于git:git常用指令

1次阅读

共计 480 个字符,预计需要花费 2 分钟才能阅读完成。

git init
git add  <file>
git commit -m "explain info"
git push [-u] <repos branch>
git log
git status
git config -l
git config user.name(or email) " "
git remote [-v] #查看本地增加了哪些近程地址
git remote add <repos> <address>
git remote remove <address>

git fetch <repos branch> #拉取近程仓库的内容,不进行合并
git pull <repos branch> #拉取近程仓库的 master 分支后与以后本地分支间接合并
git clone [-b <branch>] <address> #复制近程指定分支下代码,-b 分支名称
git branch <branch> [-a/-r] [-d] #创立分支,查看全副 / 近程分支,删除本地分支
git branch -m <old_branch> <new_branch> #本地分支重命名
git switch <branch> #切换分支
git push <repos> -d <branch> #删除近程分支 
正文完
 0