git简单操作
初始化
1.打开文件所在目录
2.git init:通过git init
命令把这个目录变成Git可以管理的仓库:
3.git add 《文件:用.表示全部文件》
4.git commit: 用命令git commit
告诉Git,把文件提交到仓库:
-m后面是本次提交说明
远程仓库
在github或者gieet创建新的git仓库
链接到github仓库
git remote add origin git@github.com:beingUSTC/logSystem.git
推送到github仓库
git push -u origin master
新建的仓库需要提交用户邮箱和用户名
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
github使用ssh与客户端链接要生成ssh密钥
1.检查有无ssh若没有则生成ssh
~/.ssh` 或者用`~/.ssh ls
$ ssh-keygen -t rsa -C "youremail@example.com"
echo "# psaData" >> README.md
git init
git add README.md
//git add .
git config --global user.email "you@example.com" (可以去掉--global)
git config --global user.name "Your Name" (可以去掉--global)
git commit -m ""
git status
git remote add origin https://github.com/figosoar/psaData.git
git push -u origin master
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步