Ubuntu + PyCharm安装和配置Git

环境: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

6、参考文档:https://git-scm.com/book/zh/v2

猜你喜欢

转载自blog.csdn.net/WZ18810463869/article/details/82464130