赞
踩
1、在云端服务器上生成一个公钥和秘钥(以后再acgit或者github上需要用到)
~:ssh-keygen
2、初始化当前文件夹为git仓库(ls -a 会多出一个.git 的文件夹)
~:git init
3、在云端创建一个新的项目
4、复制服务器上的公钥到acgit(github)中
~:cat id_rsa.pub
5、服务器配置git环境
~:git config --global user.name "Z**** Qin"
~:git config --global user.email "m****@163.com"
~:git remote add origin https://git.acwing.com/M****/acapp.git
6、添加文件进来
~:git add .
7、commit 到本地库
~:git commit -m "create new project !!"
8、push到远端acgit/github
~:git push --set-upstream origin master
小插曲:
如果需要面用户名、密码登录
这时候需要到.git 文件夹下的config文件配置url:ssh path
/----------2022年8月4日-----------/ 情人节续更
~:vi .gitignore
~:*/pycache(文件内容)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。