关于IDEA上Git的最佳实践方式,合并、检出、加标签,回滚等等

本文介绍了在IntelliJ IDEA中使用Git进行高级操作的实践方法,包括如何合并本地和远程库、添加标签、回滚代码,以及在操作过程中遇到的问题和解决方案。详细讲解了各个步骤,旨在帮助开发者更好地理解和应用Git的可视化功能。
摘要由CSDN通过智能技术生成

写在前面

基于GIT的操作方式,主要种,有人习惯命令行,说是命令行专业点,有人倾向可视化的操作,可视化的东西,是最容易掌握的,习惯用命令行的,多半是顾虑GIT的可视化的操作,是否满足平时的基本命令的问题,基于个人的习惯学习吧,我还是倾向可视化的东西,学习。

一、提交记录Tree

刚new的初始化项目 master,后来又在本地的不同分支,new Branch出V1,V2,V3分支,以及相关操作命令日志
master
V1 从master new Branch
V2 从 V1 new Branch
V3 从 master new Branch
在这里插入图片描述
以及对应所有的命令

10:29:16.858: [GitDemo] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -- js/v1.js
10:29:36.390: [GitDemo] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -f -- js/v1.js
10:29:36.985: [GitDemo] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false commit -F C:\Users\Administrator\AppData\Local\Temp\git-commit-msg-.txt --
[v1 df30d49] V1版本提交
 1 file changed, 3 insertions(+)
 create mode 100644 js/v1.js
10:30:25.413: [GitDemo] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false push --progress --porcelain origin refs/heads/v1:v1 --set-upstream
Enumerating objects: 6, done.
Delta compression using up to 8 threads
Total 4 (delta 1), reused 0 (delta 0)
remote: 
remote: Create a pull request for 'v1' on GitHub by visiting:        
remote:      https://github.com/tonels/GitDemo/pull/new/v1        
remote: 
To https://github.com/tonels/GitDemo.git
*	refs/heads/v1:refs/heads/v1	[new branch]
Branch 'v1' set up to track remote branch 'v1' from 'origin'.
Done
10:33:43.386: [GitDemo] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false checkout -b V2
Switched to a new branch 'V2'
10:35:46.980: [GitDemo] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -- js/v2.js
10:35:51.804: [GitDemo] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -f -- js/v2.js
10:35:52.223: [GitDemo] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false commit -F C:\Users\Administrator\AppData\Local\Temp\git-commit-msg-.txt --
[V2 04f36ca] V2版本提交
 1 file changed, 3 insertions(+)
 create mode 100644 js/v2.js
10:36:01.903: [GitDemo] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false push --progress --porcelain origin refs/heads/V2:V2 --set-upstream
Enumerating objects: 6, done.
Delta compression using up to 8 threads
Total 4 (delta 1), reused 0 (delta 0)
remote: 
remote: Create a pull request for 'V2' on GitHub by visiting:        
remote:      https://github.com/tonels/GitDemo/pull/new/V2        
remote: 
To https://github.com/tonels/GitDemo.git
*	refs/heads/V2:refs/heads/V2	[new branch]
Branch 'V2' set up to track remote branch 'V2' from 'origin'.
Done
10:43:32.685: [GitDemo] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -f -- js/v2.js
10:43:33.154: [GitDemo] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false commit -F C:\Users\Administrator\AppData\Local\Temp\git-commit-msg-.txt --
[V2 ebc98fc] V2版本,第二次提交
 1 file changed, 1 insertion(+)
10:43:38.810: [GitDemo] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false push --progress --porcelain origin refs/heads/V2:V2
Enumerating objects: 7, done.
Delta compression using up to 8 threads
Total 4 (delta 1), reused 0 (delta 0)
To https://github.com/tonels/GitDemo.git
 	refs/heads/V2:refs/heads/V2	04f36ca..ebc98fc
Done
10:51:29.957: [GitDemo] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false -c core.commentChar= rebase origin/master
10:57:46.724: [GitDemo] git -c credential.helper= -c core.quo
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值