Git超詳解一 基本配置 (看不懂算我輸)

2021-10-20 19:45:49 字數 1422 閱讀 2652

3.身份配置

4.修改預設編輯器

5.重新進行配置

6.補充

git init
1.系統級別:

%git安裝路徑%

/etc/gitconfig

使用者級別:

c:\users\$user\.gitconfig。
倉庫級別:

.git/config
系統級別:

/etc/gitconfig
使用者級別:

~

/.gitconfig`或`~

/.config/git/config

倉庫級別:

.git/config
配置:

1.系統級別:git config --system 配置選項

2.使用者級別:git config --global 配置選項

3.倉庫級別:git config 配置選項

因為大部分時間我都用gitee為了方便考慮,我應該在使用者級別下配置gitee的郵箱,因為這樣,我所有的gitee,都不用重複的配置郵箱。路過別的專案要用其他郵箱,就不能直接使用使用者級別的配置因為使用者級別的配置是針對gitee的,所以比如公司的專案,需要在專案倉庫中,單獨配置公司的郵箱。

git安裝好之後需要先設定一下使用者名稱和郵箱,因為提交的時候需要,git的每一步操作都要用到這些資訊。

git config --global user.name "xiaosheng"

git config --global user.email "[email protected]"

其實不建議修改,用vim很方便

git config --global core.editor emacs
git config --global core.editor "'g:\python\sublime text 3.2.2.3211 x64 cn\sublime_text.exe' -w"
git config --unset [configname]		重置指定的配置
可以加引數--global`和`--system

git status 檢視檔案狀態

Git超詳解五 變基 (看不懂算我輸)

git checkout dev git rebase master git checkout master git merge dev到現在為止,我們通過merge和rebase得到的結果都是一樣的,就是都把 合併到master分支上了。不管是變基操作後最新的提交,還是合併操作後最終的合併提交,這...

linux 安裝nodejs,看不懂算我的

1 進入根目錄 cd 語法 wget url wget 3 解壓包 語法 tar xvf 檔名 tar xvf node v10.15.0 linux x64.tar.xz 4 重新命名資料夾 語法 mv 檔名 目標檔名 node mv node v10.15.0 linux x64.tar.xz ...

linux 安裝nodejs,看不懂算我的

1 進入根目錄 語法 wget url wget 3 解壓包 語法 tar xvf 檔名 tar xvf node v10.15.0 linux x64.tar.xz 4 重新命名資料夾 語法 mv 檔名 目標檔名 node mv node v10.15.0 linux x64.tar.xz nod...