从 git 1.9.5 升级到最新的 2.6 我需要注意什么?
What i need to take care to upgrade from git 1.9.5 to latest 2.6?
我一直在为我的所有项目使用版本 1.x。
只升级到最新的 2.6 是否安全?
在工作站上我使用 sourcetreee 和 git 扩展。
我们所有的存储库都存储在用作我们 origin
远程服务器的中央服务器中。
是的,git 2.6 将打开您最初使用 1 创建的存储库。9.x 没有任何问题。
最佳做法是确保服务器上的 git 版本大于或等于客户端使用的版本,但实际上,我一直在使用 2.x 客户端推送到 1.9.x 服务器几个月没有任何问题。
勾选一个few settings that have changed with git 2.0 though:
In Git 2.0 the push.default
has been changed to simple which is narrower in scope – more specific and more intuitive – it will now only push:
- The current branch to the branch with the same name only when the current branch is set to integrate with that remote branch on the same remote;
- The current branch to the branch with the same name, if you are pushing to a remote that is not where you usually fetch from.
并且:
git add path
now equates git add -A path
可以在此处找到更实用、更方便的列表
https://felipec.wordpress.com/2014/05/29/git-v2-0-0/
大部分与默认行为有关。如果使用明确的特定命令,那么 s/he 不会遇到任何问题。
git 推送
当您键入“git push”(不带任何参数)时,Git 使用配置“push.default”来找出要推送的内容。之前‘push.default’默认为‘matching’,现在默认为‘simple’。
'匹配'配置实质上将'git push'转换为'git push origin :',这意味着推送所有匹配的分支,所以如果你有一个本地'master',还有一个远程'master','master'被推送;如果你有一个本地和远程的'fix-1','fix-1'被推送,如果你有一个本地'ext-feature-1',但是没有匹配的远程分支,它不会被推送,等等.
“简单”配置改为推送单个分支,它使用您配置的上游分支(请参阅此 post 了解上游分支的完整说明),因此如果您当前的分支是“master” ,如果'origin/master'是'master'分支的上游,'git push'基本上与'git push origin master'相同,或者更具体'git push origin master:master'(上游分支可以有不同的名称)。
‘git add’ 在目录中添加移除
我一直在为我的所有项目使用版本 1.x。
只升级到最新的 2.6 是否安全?
在工作站上我使用 sourcetreee 和 git 扩展。
我们所有的存储库都存储在用作我们 origin
远程服务器的中央服务器中。
是的,git 2.6 将打开您最初使用 1 创建的存储库。9.x 没有任何问题。
最佳做法是确保服务器上的 git 版本大于或等于客户端使用的版本,但实际上,我一直在使用 2.x 客户端推送到 1.9.x 服务器几个月没有任何问题。
勾选一个few settings that have changed with git 2.0 though:
In Git 2.0 the
push.default
has been changed to simple which is narrower in scope – more specific and more intuitive – it will now only push:
- The current branch to the branch with the same name only when the current branch is set to integrate with that remote branch on the same remote;
- The current branch to the branch with the same name, if you are pushing to a remote that is not where you usually fetch from.
并且:
git add path
now equatesgit add -A path
可以在此处找到更实用、更方便的列表 https://felipec.wordpress.com/2014/05/29/git-v2-0-0/
大部分与默认行为有关。如果使用明确的特定命令,那么 s/he 不会遇到任何问题。
git 推送 当您键入“git push”(不带任何参数)时,Git 使用配置“push.default”来找出要推送的内容。之前‘push.default’默认为‘matching’,现在默认为‘simple’。
'匹配'配置实质上将'git push'转换为'git push origin :',这意味着推送所有匹配的分支,所以如果你有一个本地'master',还有一个远程'master','master'被推送;如果你有一个本地和远程的'fix-1','fix-1'被推送,如果你有一个本地'ext-feature-1',但是没有匹配的远程分支,它不会被推送,等等.
“简单”配置改为推送单个分支,它使用您配置的上游分支(请参阅此 post 了解上游分支的完整说明),因此如果您当前的分支是“master” ,如果'origin/master'是'master'分支的上游,'git push'基本上与'git push origin master'相同,或者更具体'git push origin master:master'(上游分支可以有不同的名称)。
‘git add’ 在目录中添加移除