Moved git open to its own method