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

Open
robEllenberg opened this Issue Aug 26, 2012 · 0 comments

Comments

Projects
None yet
1 participant
@robEllenberg

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 http://stackoverflow.com/questions/957928/is-there-a-way-to-get-the-git-root-directory-in-one-command )

  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!
-Rob

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