release finish command fails when not in root git directory #251

robEllenberg opened this Issue Aug 26, 2012 · 0 comments


None yet
1 participant

I tried to finish a release branch using the following command:

git flow release finish

but since I was in a subdirectory of the repository, I received this error:

robert@robert-MS-7350:~/openHubo/doc (release/0.4.1)$ git flow release finish 0.4.1 
M   comps-plugins
M   forceSensor
M   openmr
Switched to branch 'master'
fatal: Unable to read current working directory: No such file or directory

I think this could be fixed by adding 3 steps:

  1. Store the current dir and use git rev-parse find the root directory of the current repo like so:

git rev-parse --show-toplevel

(based on suggestions from )

  1. Switch to this root directory and run the git-flow command
  2. Using the stored directory, cd back to it so the user doesn't see any changes.

Hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment