GIT安裝
訪問: https://git-scm.com/downloads ,進入git'下載頁面,根據(jù)個人操作系統(tǒng)下載對應(yīng)軟件版本,默認下載最新版;
雙擊安裝即可。選擇安裝目錄和安裝內(nèi)容,如果只是單純的使用,默認即可。
安裝TortoiseGit
安裝前,確認Git已安裝好,否則TortoiseGit是裝不上的。
訪問 : https://tortoisegit.org/download/,選擇對應(yīng)的操作系統(tǒng)位數(shù)軟件下載,
雙擊軟件,點擊next,默認安裝即可
生成秘鑰
開始菜單找到git下的git bash

執(zhí)行生成秘鑰命令:ssh-keygen –t rsa -C “用戶名”

彈出秘鑰存放路徑,回車確認即可;
提示為秘匙設(shè)置密碼;

秘鑰一般存放在當(dāng)前用戶的.ssh目錄下,執(zhí)行生成秘鑰命令時會顯示秘鑰存放路徑,同一路徑再次生成秘鑰,會覆蓋上次秘鑰;
上傳秘鑰到gitlab
1.登錄gitlab(https://gitlab.com/users/sign_in)

2. 點擊ssh keys,點擊add ssh key

3.用ue或者notepad打開C:\Users\Administrator.ssh\id_rsa.pub 復(fù)制公鑰信息,粘貼到文本框中,點擊add key
4.配置network

git信息配置
1.用戶名、郵箱配置
打開Git Bash,執(zhí)行
git config --global user.name huxf
git config --global user.email huxf@hundsunc.om
2.日志模塊配置
git config --global commit.template ~/.git-commit-template.txt
記住https認證
git config --global credential.helper store
這一步會在用戶目錄下的.gitconfig文件最后添加:
[credential]
helper = store
現(xiàn)在push你的代碼 , 這時會讓你輸入用戶名密碼, 這一步輸入的用戶名密碼會被記住, 下次再push代碼時就不用輸入用戶名密碼啦!
這一步會在用戶目錄下生成文件.git-credential記錄用戶名密碼的信息
取消https記住的認證(域賬號密碼到期修改密碼):
git config --system --unset credential.helper 常用開發(fā)工具安裝git eclipse安裝egit
選擇help,進入market搜索egit或者直接 install new software


EGit插件地址:http://download.eclipse.org/egit/updates
OK,隨后連續(xù)下一步默認安裝就可以,安裝后進行重啟Eclipse
IDEA安裝git
1.在IDEA中設(shè)置Git,在File–>Setting->Version Control–>Git–>Path to Git executable選擇你的git安裝后的git.exe文件,然后點擊Test,測試是否設(shè)置成功
根據(jù)IDEA版本的不同,會有不同的提示,但是出現(xiàn)了"Git version is xxx",即代表正確配置;

在IDEA中設(shè)置GitHub
在IDEA中設(shè)置GitHub,F(xiàn)ile–>Setting->Version Control–>GibHub
Server:github.com
Token:“權(quán)限令牌”
或
Server:github.com
Login:“用戶名”
Password:“密碼”
點擊Log In,鏈接成功會在該頁面增加一條記錄;
Token獲取方式:
點擊右上角圖像–>Settings–>Developer settins -->Personal access tokens -->Generate new token

即可生成token

在IDEA中設(shè)置GitLab
離線安裝gitlab
1.訪問: https://plugins.jetbrains.com/,搜索 gitlab,選擇"GitLab Projects"

2.下載對應(yīng)版本

3.安裝gitlab
File–>Setting->Plugins --> ”設(shè)置圖標“ -->install plugin from disk

4.選中下載的zip文件,安裝之后,選擇重啟IDEA即可;
商店安裝gitlab
1.到idea商店
File–>Setting->Plugins -->Marketplace
2. 搜索gitlab,選擇Gitlab Projects的install

3.彈出二次確認框,選擇接受,等待安裝完畢

4.重啟idea,使插件生效
IDEA設(shè)置gitlab
1.在IDEA中設(shè)置GitLab,F(xiàn)ile–>Setting->Version Control–>GitLab
2.點擊Add New GitLab Server
Server:github.com
Token:“權(quán)限令牌”
或
Server:github.com
Login:“用戶名”
Password:“密碼”
點擊Log In,鏈接成功會在該頁面增加一條記錄;

至此,配置完成。
[1]: https://www.jb51.net/article/197232.htm
[2]:https://jingyan.baidu.com/article/19020a0aedcbda129c28422c.html
[3]: git開發(fā)操作文檔>>
到此這篇關(guān)于GIT相關(guān)-IDEA/ECLIPSE工具配置的教程詳解的文章就介紹到這了,更多相關(guān)IDEA/ECLIPSE工具配置內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
您可能感興趣的文章:- IDEA2020配置Git的方法步驟
- IntelliJ IDEA 如何配置git的操作方法
- IDEA初次配置并導(dǎo)入gite碼云的方法
- IDEA配置GIT的詳細教程