上傳項目git
git initgithub
git remote add origin https://git.nevint.com/so-data-service-group/so-data-service-taskscheduler.gitssh
#git remote rm origin測試
git pull origin master --allow-unrelated-historiesui
git add .rem
git commit -m lirui #1, add user masterit
git push -u origin master編譯
配置ssh登入:ast
cd ~/.ssh/
git config --global user.name "xkwg"
git config --global user.email "xkwg@163.com"
ssh-keygen -t rsa -C "xkwg@163.com"class
到系統-用戶-本身-.ssh 打開id_rsa.pub -> 添加到git頁面, git-setting ssh中新建祕鑰
在項目的 .git下, 修改config文件, 將https地址換爲 ssh地址。
最後使用 git push 測試登入便可。
更改密碼時遇到的問題: 使用git --config修改密碼後, 仍是提示密碼錯誤。 解決: 在控制面板-用戶帳戶-管理用戶憑據 中修改git密碼。
刪除遠程倉庫
git pull
git rm touch.txt
git commit -m "for test"
git push
有衝突時
git reset --hard FETCH_HEAD
複製項目
git clone git@github.com:deeplearning4j/deeplearning4j.git
mvn編譯:到pom目錄下, mvn install