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 //查看提交修改記錄


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM