No title
No title
Bin Lian#linux
Git 新学的的几个操作
- 上传的过程:
1
2
3
4
5
6
7
8
9
10
11
12
13echo "# Open_raman_mapping" >> README.md
git init ## 初始化git
git add README.md ## 增加 README.md 文件
git commit -m "first commit" ## 对此增加 comment 提交到本地仓库
git branch -M main ## 增加分枝
git remote add origin https://github.com/<username>/Open_raman_mapping.git ## 连接远端仓库
git push -u origin main## 推送远端仓库
忽略一些不需要的文件
1 | vi .gitignore |
对于.gitignore
1 | *.csv ##正则匹配文件格式 |
撤销 git add
1 | git rm -r --cached . |
git版本回溯:
将回溯版本增加为下个版本节点:
1 | git revert <版本 ID> |
回溯到该版本并删除接下来的所有版本:
1 | git reset -hard <版本ID> |
查看历次更改及编号
1 | git log |
现版本关联远程仓库
1 | git remote set-url 2024 https://@github.com/ |
1 | git remote set-url <branch-name> https://<token>@github.com/<username>/<proj> |
感谢你赐予我前进的力量|Thank you for your support!
赞赏者名单|List of supporters
因为你们的支持让我意识到写文章的价值🙏
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Comment
匿名评论隐私政策
✅ 你无需删除空行,直接评论以获取最佳展示效果












