美文网首页javascript
git常用基本命令

git常用基本命令

作者: 池池吴 | 来源:发表于2019-09-29 23:46 被阅读0次

1.配置

git config --global user.name "www"

git config --global user.email "www@example.com"

git config --list

2.git init =>找到要上传的地方n

3.git status =>查看状态,哪些文件预备提交

4.git add 1.txt =>预备提交

5.git commit -m "" =>提交到本地git

6.git log =>查看当前日志

7.git diff =>查看更改了哪些内容

8.git reset --hard ""=>回到历史状态

9.git remote add origin https://github.com/www/v.git=>推送(在github上新建一个库)

10.git push -u origin master

11.git branch=>查看分支

12.git branch v2=>创建分支

13.git checkout v2=>切换分支

14.git merge=>合并分支

15.git branch -d v2 =>删除分支

相关文章

网友评论

    本文标题:git常用基本命令

    本文链接:https://www.haomeiwen.com/subject/zrzqpctx.html