0

Local-Branches

  • BranchA
  • FrozenBranch
  • master

Commands

git checkout BranchA
git merge origin FrozenBranch

Expectaion : I am running this command and expecting that all the changes from remote FrozenBranch will be applied to local BranchA

Please, let me know that if the outcome is something else. I am trying to make sure that this does not merge my remote master to Frozen Branch

sophist_pt
  • 329
  • 1
  • 8
  • 19
  • see https://stackoverflow.com/questions/501407/is-there-a-git-merge-dry-run-option – JeffCharter Aug 01 '17 at 21:22
  • You just said that `FrozenBranch` is a *local* branch (in the first part of the question), then used the adjective *remote* (in the second part). Git's terminology is a mess, so while there is no such thing as a "remote branch", there *is* a *remote-tracking branch* (which is not remote, it's locally-stored, and is not a branch, so it's really poorly named!) but it would be spelled `origin/FrozenBranch`, not `FrozenBranch`. In any case you definitely *do not* want to pass two names `originFrozenBranch` to `git merge`. – torek Aug 01 '17 at 21:29
  • I am just trying to make sure that `git merge origin FrozenBranch` does not merge my master branch into FrozenBranch. – sophist_pt Aug 01 '17 at 21:35

1 Answers1

1

Probably should do git merge origin/FrozenBranch but yes, it will work as you want. You will not hurt frozenbranch unless you push to frozen branch. When you push make sure you do something like git push origin BranchA:BranchA

JeffCharter
  • 1,431
  • 17
  • 27