git互联GitHub 使用教程

一、下载git

Git 公司

右键

git config --global user.name "name"

git config --global user.email "email"

ssh-keygen -t rsa -C email :生成的ssh密钥需要到github 网站中保存ssh

二、GitHub新建repository

三、本地git互联GitHub

找个地方新建总git文件夹,再新建一个拉取repository的文件夹

右键

git init

git reomte add origin https://kkgithub.com/Ansir-AMD3750/First_project.git

git branch -a

git branch -m master main git 和GitHub默认的主分支有main和master冲突,重命名一下本地master为main,与GitHub同步

四、修改代码与提交

可以在git bash窗口中直接使用vim工具:vim a.txt -> i -> esc -> : wq

git status

git add .

git commit -m "xxxxxxx"

git status

git branch -a

git push origin main

相关推荐
Just_Paranoid20 分钟前
【Gerrit Patch】批量下载 Gerrit 提交的 Patch
git·gerrit·shell·patch
小和尚同志9 小时前
使用 Certimate 实现自动续签 SSL 证书
开源·github·自动化运维
怣疯knight10 小时前
Flocus+Github实现浏览器书签同步
github
T - mars13 小时前
Pycharm中使用git
ide·git·pycharm
黄金旺铺14 小时前
【GitHub Issue Fetcher】 轻松整理项目问题与解决方案知识库
github·issue
逛逛GitHub14 小时前
GitHub 上贼牛逼浏览器自动化 MCP,已有 2 万人点赞。
github·mcp
AI分享官14 小时前
低代码平台+MonkeyCode混合开发:3天上线一个App的野路子实操
github·ai编程
jason_yang15 小时前
Workspace搭建Vue3+组件分离的Monorepo项目
git·npm·前端工程化
什么半岛铁盒16 小时前
C++项目:仿muduo库高并发服务器--------Any类的实现
linux·服务器·数据库·c++·mysql·github
齐杰拉19 小时前
解决 chrome-devtools-mcp 在 cursor 无法生效的问题。No tools, prompts, or resources
github