Unable to edit commit in Mac
Closed this issue · 5 comments
Started with:
tortilla edit step "21.10"
Then edited the file, and typed: git commit --amend
, got the errors:
Dotans-MacBook-Pro:meteor-angular2.0-socially dotansimha$ git commit --amend package.json
/usr/local/lib/node_modules/tortilla/src/hooks/pre-commit.js:13
if (!Git.gonnaAmend()) throw Error(
^
Error: New commits are prohibited! Use `$ npm step -- push` instead
at Error (native)
at /usr/local/lib/node_modules/tortilla/src/hooks/pre-commit.js:13:32
at Object.<anonymous> (/usr/local/lib/node_modules/tortilla/src/hooks/pre-commit.js:58:3)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
Had to override using --no-verify
and then git rebase --continue
I'm trying to look at this problem using an old macbook. Just to make sure, can you please tell me what version of osx node and git are you using?
Dotans-MBP:~ dotansimha$ sysctl hw.model
hw.model: MacBookPro11,1
Dotans-MBP:~ dotansimha$ sw_vers -productVersion
10.12.1
Dotans-MBP:~ dotansimha$ system_profiler SPSoftwareDataType
Software:
System Software Overview:
System Version: macOS 10.12.1 (16B2555)
Kernel Version: Darwin 16.1.0
Boot Volume: Mac OS X
Boot Mode: Normal
Computer Name: Dotan’s MacBook Pro
User Name: Dotan Simha (dotansimha)
Secure Virtual Memory: Enabled
System Integrity Protection: Enabled
Time since boot: 4 days 4:47
Dotans-MBP:~ dotansimha$ node --version
v6.9.1
Dotans-MBP:~ dotansimha$ git --version
git version 2.9.3 (Apple Git-75)
Dotans-MBP:~ dotansimha$
@dotansimha I didn't encounter any issues while trying to run the scenario. It seems like the problem is that tortilla
doesn't recognize the hook as a child process of git
which was invoked with the argument --amend
. Are you using any aliases of some sort to amend you changes indirectly? I also tried to create a dedicated hook to see if it is recognized as a child process of git amend
and it did... If you do use aliases try to run git commit --amend
directly just to see if I'm on the right track.
Updated git version and tried again and now it's fine :)
I'm getting this issue but with git version 2.11. I think it should really work regardless of git version in order not to confuse ppl since this seems like a core step in my process.
Maybe my process is a bit off too, but so far it's been:
tortilla create
- add stuff to my project
- `tortilla step push -m 'stuff' (by the way, if you don't add a message, you break the whole system!)
- repeat steps 2,3 till sub-steps are complete
tortilla step tag -m 'better make a commit msg or things will break'
tortilla manual render --all
get the manual files createdtortilla step edit
edit the manual- edit .tmpl file for latest step
tortilla manual render step X
rerender the manual- repeat steps 8,9 till I the .md files look right
git commit --amend
apply the changesgit rebase --continue
finish editing major step and move to next step- repeat steps 2-12
is there a better way?