Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gitflow Installation Problems

Tags:

git

git-flow

I am trying to get gitflow running on Windows using the instructions here: https://github.com/nvie/gitflow (I am using Windows Server 2003 SP2 64 bit)

I have tried both Cygwin and msysgit.

With Cygwin, calling wget just returns nothing.

With msysgit I get quite a bit further, but when I try and run git flow init I get the following error:

C:\Program Files (x86)\Git/libexec/git-core/git-flow: line 45: dirname: command not found
C:\Program Files (x86)\Git/libexec/git-core/git-flow: line 68: /gitflow-common: No such file or directory
C:\Program Files (x86)\Git/libexec/git-core/git-flow: line 76: /gitflow-shFlags: No such file or directory

Looking at the first error in the git-flow bash file, line 45 contains:

export GITFLOW_DIR=$(dirname "$0")

I've also tried following the steps here https://github.com/nvie/gitflow/issues/issue/25?authenticity_token=54d6387519b4751c2fb13840c52bb819dee10af4 but it doesn't make any difference.

Any ideas?

Thanks

like image 765
DownChapel Avatar asked Jan 11 '11 18:01

DownChapel


People also ask

What is the difference between Git and Gitflow?

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. On the other hand, Git Flow is detailed as "A set of git extensions to provide high-level repository operations".


2 Answers

This is how I got it to work in Windows:

  1. Install msysgit: http://code.google.com/p/msysgit/
  2. Follow the install instructions in the gitflow readme: https://github.com/nvie/gitflow
  3. Download "git-flow-completion": https://github.com/bobthecow/git-flow-completion
    • Copy "git-flow-completion.bash" from the git-flow-completion zip file to C:\Program Files (x86)\Git\etc
    • Create a new file called "bash_profile" (no extension) in C:\Program Files (x86)\Git\etc and add this one line:
      source "c:\Program Files (x86)\Git\etc\git-flow-completion.bash"
like image 123
Trev Avatar answered Oct 12 '22 18:10

Trev


For the msysgit installation, I'm not sure where dirname would normally come from (I'm not a windows guy). It's possible it's included in that util-linux package that is mentioned in the gitflow installation instructions. It's also possible your PATH is borked - have a look in the usual places (/bin, /usr/bin, /usr/local/bin) and see if dirname is in any of them, and see if your PATH is missing that one. Failing all that, dirname $0 is simply the name of the directory containing that script, so it's possible that you could simply hardcode that and proceed.

Edit:

Aha. According to this question, the wget certificate error is a known issue, not specific to github. It's been fixed in wget, but the fix hasn't been released yet in debian/ubuntu, and I'm not sure how long it'll take to work its way through to cygwin. You can work around it as mentioned in the linked question, though. But of course, I think it's probably much better to use msysgit than cygwin git, from what I've heard.

like image 1
Cascabel Avatar answered Oct 12 '22 17:10

Cascabel