Git基本使用

找一个文件夹

git init

代码仓库,里面的内容千万不要动

新建一个文件,如test.txt

git add test.txt
//git add .  //all

暂存区

git commit -m "新增了一个点赞"

最常用的流程:

修改一个文件

git add

git commit

git log  //查看节点
git log --stat //查看修改了什么文件

commit id

git diff id

git 管理工具如pycharm

回溯

git reset --hard [commit id]
git checkout [commit id]

分支

git branch

查看哪些分支

git checkout -b develop //新建分支
git branch

建立完毕 需要合并 develop->master

git add .
git commit -m "新增了关注和转发功能"
git checkout master
git merge develop
相关推荐
西柚与蓝莓1 天前
任务【浦语提示词工程实践】
github
Good_Starry1 天前
Git介绍--github/gitee/gitlab使用
git·gitee·gitlab·github
云端奇趣1 天前
探索 3 个有趣的 GitHub 学习资源库
经验分享·git·学习·github
运营黑客2 天前
发现一超级Prompt:让GPT-4o、Claude3.5性能再升级(附保姆级教程)
github
記億揺晃着的那天2 天前
Github优质项目推荐-第二期
github
Uncertainty!!2 天前
GitHub入门与实践
github
罗曼蒂克在消亡2 天前
github项目——gpt-pilot自动创建应用
gpt·github·github项目
篝火2 天前
MindSearch 部署到Github Codespace 和 Hugging Face Space
人工智能·python·github
艾伦~耶格尔2 天前
Git 下载及安装超详教程(2024)
git·gitee·码仓