Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions GITFLOW_VERSION.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
The plugin requires that you have gitflow installed, specifically the [AVH edition](https://github.com/petervanderdoes/gitflow). This is because the [Vanilla Git Flow](https://github.com/nvie/gitflow) hasn't been maintained in years
The plugin requires that you have a maintained fork of gitflow installed. We recommend the modern **[GitFlowNext (by Tower)](https://github.com/git-tower/git-flow)** or the legacy **[AVH edition](https://github.com/petervanderdoes/gitflow)**. This is because the [Vanilla Git Flow](https://github.com/nvie/gitflow) hasn't been maintained in years.

> **Note for Windows Users:** Git for Windows removed the built-in AVH edition starting from version 2.51.1. If you are getting a "command not found" error, you must install a modern alternative like GitFlowNext.

**How to check Git Flow version**

run `git flow version`

If it says `0.4.1` then you have the wrong version. You will have to uninstall it and then refer to [AVH edition](https://github.com/petervanderdoes/gitflow) docs for installation.
If it says `0.4.1`, then you have the wrong (Vanilla) version. You will have to uninstall it and then install a supported fork.
If the output contains `AVH` or `next` / `Tower`, you are good to go!

**How to install GitFlowNext (Recommended)**

**How to uninstall wrong version on OSX**
* **Windows:** You can install it via winget: `winget install GitTower.GitFlowNext` *(Make sure to rename the downloaded executable to `git-flow.exe` and place it in your Git `mingw64\libexec\git-core` directory).*
* **Mac/Linux/Windows:** Refer to the official [GitFlowNext Installation Docs](https://github.com/git-tower/git-flow) for detailed instructions.

If installed via `brew` then run `brew uninstall git-flow`
**How to uninstall wrong version on OSX**

If installed via `brew` then run `brew uninstall git-flow`

**Mac/Linux users:**

Expand All @@ -19,4 +25,4 @@ If you're running into issues like getting
or
`git: 'flow' is not a git command. See 'git --help'.`

Please be sure to check out [this thread](https://github.com/OpherV/gitflow4idea/issues/7)
Please be sure to check out [this thread](https://github.com/OpherV/gitflow4idea/issues/7)
12 changes: 10 additions & 2 deletions src/main/java/gitflow/GitflowVersionTester.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,21 @@ public String getVersion() {

/**
* Returns true if the {@code git flow} version can be determined
* and is any AVH version ({@code #contains("AVH")}) and
* and is any AVH version ({@code #contains("AVH")}), any Tower version ({@code #contains("Tower")}) ,
* any Next version ({@code #contains("Next")}) and
* not the unmaintained NVIE version.
*
* @return true if we think the git flow version is an AVH version.
*/
public boolean isSupportedVersion() {
return version != null && version.contains("AVH");
if (version == null) {
return false;
}

String versionLower = version.toLowerCase();
return versionLower.contains("avh") ||
versionLower.contains("tower") ||
versionLower.contains("next");
}

public void init(){
Expand Down