环境:Ubuntu + PyCharm + GitLab
1、安装Git
sudo apt-get install git
2、Git全局设置
git config --global user.name "Username"
git config --global user.email "[email protected]"
3、生成Git的SSH Key
ssh-keygen -t rsa -C "[email protected]"
Public Key如下:
4、PyCharm设置
5、其他相关命令行:
Create a new repository
git clone [email protected]:wangzhi/WangZhi.git
cd WangZhi
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
Existing folder or Git repository
cd existing_folder
git init
git remote add origin [email protected]:wangzhi/WangZhi.git
git add .
git commit
git push -u origin master