我现在对git很困惑。我创建了两个分支,其中一个是从master创建的,另一个是从该分支创建的......就像这样:
master -> Branch1
|
Branch2
Branch2是功能工作,它依赖于Branch1的一些更改。
我按如下方式创建了这些分支:
git checkout -b Branch1
git checkout -b Branch2 Branch1
但是当我在Branch2中进行更改,然后切换回Branch1时,diff仍会显示更改,如果我提交并推送,它会将所有更改推送到Branch1。
我到底哪里出错了?我该如何解决这个烂摊子?
编辑:
添加.git / config以供参考...
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[remote "origin"]
url = <REPO URL>
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[branch "BRANCH1"]
remote = origin
merge = refs/heads/BRANCH1
[branch "BRANCH2"]
remote = origin
merge = refs/heads/BRANCH2