关于IDEA上Git的最佳实践方式
写在前面
基于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