github常用命令

2021-07-23 19:04:54 字數 567 閱讀 7530



github常用命令

git remote add upstream

git clone

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 //檢視提交修改記錄

GitHub常用命令

1 git簡介 git是用c語言開發的分布版本控制系統。版本控制系統可以保留乙個檔案集合的歷史記錄,並能回滾到另外乙個狀態 歷史記錄狀態 對於任何乙個檔案,在 git 內都只有三種狀態 已提交 committed 已修改 modified 和已暫存 staged 已提交表示該檔案已經被安全地儲存在本...

GitHub常用命令

1 mkdir tmp 在當前目錄下建立乙個新的目錄 tmp 2 cd tmp 切換到tmp目錄下 3 git init tmp目錄作為乙個本地倉庫,初始庫git庫 4 touch test.md 在當前目錄下建立了檔案 test.md 5 git add test.md 將test.md檔案增加到...

github常用命令

github常用命令 git push origin master 把本地原始碼庫push到github上 git pull origin master 從github上pull到本地原始碼庫 git config list 檢視配置資訊 git status 檢視專案狀態資訊 git branch...