Chr*_*aes 8 git rebase git-rebase
我已经设置了git
git config --global branch.autosetuprebase always
Run Code Online (Sandbox Code Playgroud)
它在我的~/.gitconfig文件中看起来不错:
[branch]
autosetuprebase = always
Run Code Online (Sandbox Code Playgroud)
然而,当我这样做
git pull
Run Code Online (Sandbox Code Playgroud)
他执行合并(我删除了公司特定数据):
From gitlab:***/***
8fd1d96..0d064a3 master -> origin/master
* [new tag] *** -> ***
Merge made by the 'recursive' strategy.
Run Code Online (Sandbox Code Playgroud)
他为什么不进行变革呢?请注意,他从远程获取的唯一内容是标记和文件中的次要代码更改未在本地更改...
编辑:我有git版本1.8.4.5
编辑:这是我的本地.git/config文件:
[core]
repositoryformatversion = 0
filemode = true
logallrefupdates = true
[branch "master"]
[remote "origin"]
url = git@gitlab:***/***.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
Run Code Online (Sandbox Code Playgroud)
twa*_*erg 10
该branch.autosetuprebase选项git仅影响设置后创建的分支.从手册页(git help config):
branch.autosetuprebase
When a new branch is created with git branch or git checkout that tracks another branch, this variable
tells Git to set up pull to rebase instead of merge (see "branch.<name>.rebase"). When never, rebase is ...
Run Code Online (Sandbox Code Playgroud)
对于已经存在的分支,例如master,git config branch.master.rebase true如果需要,可以为多个分支/ repos编写脚本.
| 归档时间: |
|
| 查看次数: |
1914 次 |
| 最近记录: |