2

I have a bash script running on ubuntu and on windows: git add -A git commit -a -m "auto l" git pull -s recursive -X theirs git push origin

In ubuntu the second to last line causes nano editor to pop up requesting naming or editing of MERGE_MSG. Windows no such problem. EDIT WINDOWS TOO Rerunning the script 2 more times solves problem but that seems sloppy. Exists another -m 'auto' I must add during pull or what?

ran8
  • 187
  • 11
  • seems like just needs --no-edit https://stackoverflow.com/questions/11744081/why-is-git-prompting-me-for-a-post-pull-merge-commit-message#11744469 – ran8 Jan 28 '18 at 00:40

1 Answers1

2

Check if (on Windows) you do have a pull.rebase setting set to true (as I recommend since Git 2.9)

git config pull.rebase 
git config rebase.autoStash 

That would means Git on Windows would rebase your local commits on top of origin/yourBranch, instead of trying to create a merge commit between origin/yourBranch and yourBranch.

But if you don't, and if that must create a merge commit, then, as noted by the OP, git pull --no-edit can can be used to accept the auto-generated message (this is generally discouraged, but here useful).

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • git config --get is empty for both. Can I really re-base if 2 computers are automatic and one will edit files each auto computer changes also? – ran8 Jan 17 '18 at 02:21
  • infact i don't think those exist – ran8 Jan 17 '18 at 03:25
  • @ran8 you can set those configs up: `git config --global pull.rebase true` and `git config --global rebase.autostash true` – VonC Jan 17 '18 at 07:25
  • @ran8 The rebase can be automatic if there is no conflict. – VonC Jan 17 '18 at 07:26