tag:help.appveyor.com,2012-11-13:/discussions/problems/15298-git-commit-to-another-repo-is-ignoredAppVeyor: Discussion 2018-09-24T21:00:27Ztag:help.appveyor.com,2012-11-13:Comment/457698372018-07-25T10:39:37Z2018-07-25T10:39:37Zgit commit to another repo is ignored<div><p>I assume you are running Windows build (not Linux one). So you call <code>git commit</code> in CMD mode (no prefix defaults to CMD on Windows builds). However environment variables are in PowerShell style. <code>%APPVEYOR_BUILD_NUMBER%</code> is correct option. Look at error it throws deeper, but first start using both variables (%APPVEYOR_BUILD_VERSION% too) in CMD style.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/457698372018-07-25T11:52:28Z2018-07-25T11:52:28Zgit commit to another repo is ignored<div><p>Thanks for the response, yes, it is a Windows build. However if I use the line:</p>
<pre>
<code> - git commit -a --allow-empty -m "Appveyor commit: %APPVEYOR_BUILD_NUMBER%, %APPVEYOR_BUILD_VERSION% based on %APPVEYOR_REPO_COMMIT%"</code>
</pre>
<p>I am getting the following error:</p>
<pre>
<code>Error parsing appveyor.yml: (Line: 52, Col: 43, Idx: 1662) - (Line: 52, Col: 44, Idx: 1663): While scanning for the next token, find character that cannot start any token.</code>
</pre></div>blaesertag:help.appveyor.com,2012-11-13:Comment/457698372018-07-25T11:56:27Z2018-07-25T11:56:27Zgit commit to another repo is ignored<div><p>Wrap the command in single quotes, e.g.</p>
<pre>
<code>- 'git commit -a --allow-empty -m "Appveyor commit: %APPVEYOR_BUILD_NUMBER%, %APPVEYOR_BUILD_VERSION% based on %APPVEYOR_REPO_COMMIT%"'</code>
</pre>
<p>You can always use UI and <code>Export YAML</code> button if you are not sure in syntax.</p></div>Ilya Finkelshteyn