小编djs*_*hny的帖子

git merge更新源分支上未更改的文件

我很难理解以下行为在git中是一件好事.请参阅下面的示例,我将它放在一起以帮助说明我的问题.很多时候,我的团队和我自己正在进行更改/提交进入我们不想去那里的分支机构.

> git init sandbox && cd sandbox
> echo "data a" > a.txt && echo "data b" > b.txt
> git add -A && git commit -a -m "initial population"
[master (root-commit) d7eb6af] initial population
 2 files changed, 2 insertions(+)
 create mode 100644 a.txt
 create mode 100644 b.txt
> git branch branch1
> echo "more data a" >> a.txt && git commit -a -m "changed a.txt on master"
[master 11eb82a] changed a.txt on master
 1 file changed, 1 insertion(+) …
Run Code Online (Sandbox Code Playgroud)

git git-merge

7
推荐指数
1
解决办法
3250
查看次数

标签 统计

git ×1

git-merge ×1