git使用筆記

2021-10-10 15:58:09 字數 561 閱讀 8495

之前一直使用svn作為版本控制工具,最近學習使用git配合gitee作為**版本控制工具,記錄一些筆記。

初始化本地倉庫

進入本地的乙個資料夾git init

配置github/gitee賬戶資訊

git config --global user.name "yourname"

git config --global user.email "youremail"

拉取遠端倉庫**

git pull

提交修改

使用add命令將修改的檔案新增的本地快取

git add .

使用commit命令提交到本地倉庫

git commit -m "提交注釋"

設定遠端倉庫

git remote add tag

將本地倉庫的**推送到遠端倉庫

git push 本地分支名 遠端分支名

git 使用筆記

git 使用筆記 初始化資訊 git config user.name name git config user.email com git config core.editor vim git init 初始化資訊 從遠端pull git clone git url git pull push 到...

git使用筆記

回滾 git checkout sql 沒有 git add 之前 執行回滾到原始狀態 git reset head sql 執行git add之後,但是沒有 git commit之前 操作,然後在執行 git checkout git remote v 檢視遠端倉庫詳細資訊 git log log...

Git使用筆記

用了一段時間的tortoisgit,基本能滿足目前的需求。但是當切換到linux的工作環境時,就有點不知所措了,於是又複習了一下git的命令,相對於第一次學習,又有了新的認識。工作區 working tree 所有有改動的檔案都存在於工作區。暫存區 index 對於已經存在於工作區的檔案,執行git...