github常用命令

来源:互联网 发布:ubuntu嵌入式工控机 编辑:程序博客网 时间:2024/06/05 03:43

github常用命令

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 //查看提交修改记录

0 0
原创粉丝点击