当前位置:首页 > 通信资讯 > 正文

github基本命令(github常用操作)

github常用命令

最近开始研究github,mark下一些常用命令

git remote add upstream https://github.com/winterIce/testTitle.git(别人的repository) // 新建分支用于存放别人的repository

git clone https://github.com/winterIce/testTitle.git 克隆到本地

git fetch branch2//更新信息

git merge branch2/master //merge本地信息

git add . //添加新文件或者更改新文件

git remove ** //删除文件

git commit -m 'by who do what' //提交文件到本地

git push push到服务器

git pull origin master 从服务器上拉取信息

git remote 查看repository上的所有分支

git branch -a 查看所有分支

git branch -r 查看远程分支

git branch -d *** //删除分支

git branch *** //新建分支

git checkout ***//切换分支

git status //查看状态

git log //查看提交修改记录

以上就是对Git命令的整理,后续继续补充,谢谢大家对本站的支持!

如果您对该产品感兴趣,请填写办理(客服微信:xiaoxiongyidong)

为您推荐:

发表评论

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。