# Column: Git Status

**URL:** <https://resource.dopus.com/t/column-git-status/29230>\
**Category:** Buttons/Scripts\
**Tags:** script, column, jscript\
**Created:** [June 28, 2018, 3:07pm UTC](https://resource.dopus.com/t/column-git-status/29230 "2018-06-28T15:07:38Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![tbone](https://resource.dopus.com/user_avatar/resource.dopus.com/tbone/32/25726_2.png) [@tbone](https://resource.dopus.com/u/tbone)\
**Post date:** [June 28, 2018, 3:07pm UTC](https://resource.dopus.com/t/column-git-status/29230/1 "2018-06-28T15:07:38Z")

</div>

Git-Status column(s) for experimental purposes.. o)

The columns use a regular git.exe somewhere in your %PATH% or from the settings of the script. A special output mode of "git status" is used to get information for all the items in the current folder of the git repo. There also is some caching and some magic logic involved to also show you the old name or location of items, when these were renamed or moved within the repo e.g., which is something you don't get to see with every git "integration".

Columns:

- Branch
- Status
- Status (native)
- Name
- Type

 ![image](https://resource.dopus.com/uploads/default/original/3X/4/7/470717c5cbc73b037f6e67c67cb66ea84215ffe1.png)

 ![image](https://resource.dopus.com/uploads/default/original/3X/7/7/777becaea123cdbb4b0f0b30f8d34f8ed2fdb508.png)

[Column.Generic\_Git.js.txt v0.3.6](https://resource.dopus.com/uploads/short-url/8LrhMUkHUlqWFCivoYEZCb7jkaM.txt) (64.6 KB)  
// v0.3.6 - 2025-06-08  
// - move some functions into global context (for better performance)  
// - fixed an issue with blanks in file folder names  
// - focus on subfolder only when running "git status" (added path to "status" param as well)  
// - added basic icon status column (work in progress)

[Column.Generic\_Git.js.txt v0.3.4](https://resource.dopus.com/uploads/short-url/1nQ4TKhilCHSwV6dORsAfIearEl.txt) (56.7 KB)  
// v0.3.4 - 2025-06-06  
// - fixed "out of range" script errors (for ".git" folder i think)  
// - use more sensible "default" value handling for column values and ".git" folder  
// - new setting for custom status of ".git" data folder  
// - flip change log order

[Column.Generic\_Git.js.txt v0.3.3](https://resource.dopus.com/uploads/short-url/y0LzWcA7BW1HscpXsms9sad0lso.txt) (54.4 KB)  
// v0.3.3 - some branch column value fix  
// v0.3.2 - added branch column  
// v0.3.1 - small change regarding "modified" status detection

[Column.Generic\_Git.js.txt v0.3](https://resource.dopus.com/uploads/default/original/3X/6/f/6f789a611f99f013f475ee2a38bdee0c15e09801.txt) (52.5 KB)

---

<div class="post-metadata">

**Author:** ![piyoosh](https://resource.dopus.com/letter_avatar_proxy/v4/letter/p/ba9def/32.png) [@piyoosh](https://resource.dopus.com/u/piyoosh)\
**Post date:** [October 18, 2018, 4:27pm UTC](https://resource.dopus.com/t/column-git-status/29230/2 "2018-10-18T16:27:44Z")

</div>

I can't download it. Clicking the link has no effect.

---

<div class="post-metadata">

**Author:** ![blueroly](https://resource.dopus.com/user_avatar/resource.dopus.com/blueroly/32/24279_2.png) [@blueroly](https://resource.dopus.com/u/blueroly)\
**Post date:** [October 18, 2018, 4:29pm UTC](https://resource.dopus.com/t/column-git-status/29230/3 "2018-10-18T16:29:09Z")

</div>

Have you tried right clicking and selecting "Save link As"? Both methods work for me FWIW.

---

<div class="post-metadata">

**Author:** ![piyoosh](https://resource.dopus.com/letter_avatar_proxy/v4/letter/p/ba9def/32.png) [@piyoosh](https://resource.dopus.com/u/piyoosh)\
**Post date:** [October 18, 2018, 4:29pm UTC](https://resource.dopus.com/t/column-git-status/29230/4 "2018-10-18T16:29:56Z")

</div>

That worked. Thanks!

I don't know why normal clicks don't have an effect.

---

<div class="post-metadata">

**Author:** ![mortimertwist](https://resource.dopus.com/letter_avatar_proxy/v4/letter/m/aeb1de/32.png) [@mortimertwist](https://resource.dopus.com/u/mortimertwist)\
**Post date:** [November 17, 2021, 8:26pm UTC](https://resource.dopus.com/t/column-git-status/29230/5 "2021-11-17T20:26:59Z")

</div>

Thanks that's very useful!

---

<div class="post-metadata">

**Author:** ![Reyhn](https://resource.dopus.com/user_avatar/resource.dopus.com/reyhn/32/12694_2.png) [@Reyhn](https://resource.dopus.com/u/Reyhn)\
**Post date:** [January 28, 2022, 10:59am UTC](https://resource.dopus.com/t/column-git-status/29230/6 "2022-01-28T10:59:46Z")

</div>

How do you use this?  
I have added it to Settings -\> Preferences -\> Toolbars -\> Scripts and checked the checkbox. Then I right-clicked the column headers in the file lister, and checked Columns -\> Script -\> Column.Generic: Git -\> Git.Status, but when I browse a Git-repository, the column only displays a dash for all files (regardless of actual status).

---

<div class="post-metadata">

**Author:** ![Reyhn](https://resource.dopus.com/user_avatar/resource.dopus.com/reyhn/32/12694_2.png) [@Reyhn](https://resource.dopus.com/u/Reyhn)\
**Post date:** [January 28, 2022, 11:13am UTC](https://resource.dopus.com/t/column-git-status/29230/7 "2022-01-28T11:13:10Z")

</div>

This might be a conflict with Subversion.  
My folder is both a Git-repo and a SVN-repo at the same time.  
The column Status (found via Columns -\> General -\> Status icons) displays the status for Subversion (which always works fine, without any scripts). But the logs from this script shows the following:

```auto
 2022-01-28 12:12 GIT : SCRIPT REINIT
 2022-01-28 12:12 GIT : Column_OnGitColumn(Status): Column.Generic_Git.js.txt
 2022-01-28 12:12 GIT : Path: R:\Settings\Directory Opus\Script AddIns
 2022-01-28 12:12 GIT : Repo.lastTime: 0
 2022-01-28 12:12 GIT : RepoRoot: R:\Settings
 2022-01-28 12:12 GIT : Reload needed (first)
 2022-01-28 12:12 GIT : FetchRepoStatus(Status)
 2022-01-28 12:12 GIT : Fetching repo [R:\Settings]..
 2022-01-28 12:12 GIT : RunHiddenAdvanced():
 2022-01-28 12:12 GIT : CMD: %comspec% /c ""Git.exe" -C "R:\Settings\Directory Opus\Script AddIns" status --ignored --porcelain >"C:\Users\Reyhn\AppData\Local\Temp\DO.GitColumn.radC9594.tmp.txt" 2>"C:\Users\Reyhn\AppData\Local\Temp\DO.GitColumn.radC9594.tmp.txt.err.txt""
 2022-01-28 12:12 GIT : Return: 0
 2022-01-28 12:12 GIT : ReadFile():
 2022-01-28 12:12 GIT : ReadFile(), opening [C:\Users\Reyhn\AppData\Local\Temp\DO.GitColumn.radC9594.tmp.txt]..
 2022-01-28 12:12 GIT : ReadFile():
 2022-01-28 12:12 GIT : ReadFile(), opening [C:\Users\Reyhn\AppData\Local\Temp\DO.GitColumn.radC9594.tmp.txt.err.txt]..
 2022-01-28 12:12 GIT : Column_OnGitColumn(Status): Git-branch.js
 2022-01-28 12:12 GIT : Repo.lastTime: 1643368327284
 2022-01-28 12:12 GIT : RepoRoot: R:\Settings
 2022-01-28 12:12 GIT : Skipping reload, column [Status].
 2022-01-28 12:12 GIT : Column_OnGitColumn(Status): ReadMe.txt
 2022-01-28 12:12 GIT : Repo.lastTime: 1643368327284
 2022-01-28 12:12 GIT : RepoRoot: R:\Settings
 2022-01-28 12:12 GIT : Skipping reload, column [Status].

```

Since the logs mention the column named Status, which is SVN, I guess there is a conflict causing it to not reload the Git-status.

In a directory which is **only** a Git-repository, this script works.

---

<div class="post-metadata">

**Author:** ![tbone](https://resource.dopus.com/user_avatar/resource.dopus.com/tbone/32/25726_2.png) [@tbone](https://resource.dopus.com/u/tbone)\
**Post date:** [January 29, 2022, 4:26pm UTC](https://resource.dopus.com/t/column-git-status/29230/8 "2022-01-29T16:26:38Z")

</div>

From the log it looks like you are using these git columns in "R:\Settings\Directory Opus\Script AddIns", as it runs "git status" in there. If you have the feeling, that the columns do not work, if the git-repo is also a SNV-repo, then please try "git status" in that repo on its own first. The script behind these columns does nothing else than to run "git status" and parse the output.  
Maybe also check content of temporary files "C:\Users\Reyhn\AppData\Local\Temp\DO.GitColumn..\*.txt".

The script still runs fine for me every day.. I do not use SVN though. o)

---

<div class="post-metadata">

**Author:** ![Kris](https://resource.dopus.com/letter_avatar_proxy/v4/letter/k/82dd89/32.png) [@Kris](https://resource.dopus.com/u/Kris)\
**Post date:** [June 6, 2025, 9:27am UTC](https://resource.dopus.com/t/column-git-status/29230/9 "2025-06-06T09:27:37Z")

</div>

Is this tool still working?  
I have Git and TortoiseGit (I do use TortoiseSVN) installed:

 ![image](https://resource.dopus.com/uploads/default/original/3X/0/a/0aa9c85958480be9f903128a0e8f9999c51e8291.png)

So I have installed this script (Column.Generic\_Git.js.txt v0.3) and I have added the 4 columns this script is adding (Git-status, Git-status (native), Type, Name):

- 'Git-status' and 'Git-status (native)', but they are empty for all files and all repositories.
- 'Type' and 'Name' have something, there is something inside but I do not understand which value they bring compared to the built-in 'Type' and 'Name' columns of Windows/Directory Opus.  
 ![image](https://resource.dopus.com/uploads/default/original/3X/8/4/848bf666d227d35375321f59d60d1978cace6e0a.png)

---

<div class="post-metadata">

**Author:** ![tbone](https://resource.dopus.com/user_avatar/resource.dopus.com/tbone/32/25726_2.png) [@tbone](https://resource.dopus.com/u/tbone)\
**Post date:** [June 6, 2025, 10:49am UTC](https://resource.dopus.com/t/column-git-status/29230/10 "2025-06-06T10:49:46Z")

</div>

Yes, still works for me, using..  
 ![image](https://resource.dopus.com/uploads/default/original/3X/5/d/5d8250fcaa8b202ece1daa5a9c2eb5e2815be0cb.png)

Is git.exe in your %PATH%? If not, set the path to git.exe in the settings of the script.

---

<div class="post-metadata">

**Author:** ![tbone](https://resource.dopus.com/user_avatar/resource.dopus.com/tbone/32/25726_2.png) [@tbone](https://resource.dopus.com/u/tbone)\
**Post date:** [June 6, 2025, 11:01am UTC](https://resource.dopus.com/t/column-git-status/29230/11 "2025-06-06T11:01:50Z")

</div>

Just checked again with DO v13 (post above was still using v12) and  
 ![image](https://resource.dopus.com/uploads/default/original/3X/8/d/8d4005fb229c9ac414d56bd4002f428b9d8e7505.png)

And does fine on this setup as well..

 ![image](https://resource.dopus.com/uploads/default/original/3X/f/2/f212d5a991ef8895e667651373997fa368be0077.png)

---

<div class="post-metadata">

**Author:** ![tbone](https://resource.dopus.com/user_avatar/resource.dopus.com/tbone/32/25726_2.png) [@tbone](https://resource.dopus.com/u/tbone)\
**Post date:** [June 6, 2025, 11:06am UTC](https://resource.dopus.com/t/column-git-status/29230/12 "2025-06-06T11:06:45Z")

</div>

Update to v0.3.3:

- v0.3.1 - small change regarding "modified" status detection
- v0.3.2 - added branch column
- v0.3.3 - some branch column value fix

Uploaded the version I use, just to make sure we are on the same page. My version here had just minor changes (I assume), but who knows, maybe they make the difference.

---

<div class="post-metadata">

**Author:** ![Kris](https://resource.dopus.com/letter_avatar_proxy/v4/letter/k/82dd89/32.png) [@Kris](https://resource.dopus.com/u/Kris)\
**Post date:** [June 6, 2025, 11:23am UTC](https://resource.dopus.com/t/column-git-status/29230/13 "2025-06-06T11:23:52Z")

</div>

I had git.exe in my %PATH%  
 ![image](https://resource.dopus.com/uploads/default/original/3X/2/e/2ea2a37cc48d6ff8a2df46c0638bf2032cdaaf60.png)  
so this is not the cause. I am going to try your latest version

---

<div class="post-metadata">

**Author:** ![Kris](https://resource.dopus.com/letter_avatar_proxy/v4/letter/k/82dd89/32.png) [@Kris](https://resource.dopus.com/u/Kris)\
**Post date:** [June 6, 2025, 12:07pm UTC](https://resource.dopus.com/t/column-git-status/29230/14 "2025-06-06T12:07:26Z")

</div>

I have tested your latest update and it works 😊 thank you.

The 'Git-Status' column is currently using text to indicate status: for example "modified".  
To look more like a status column, how can this be replaced with icons like:  
 ![](https://resource.dopus.com/uploads/default/original/3X/2/5/25542100e33dc7ea579a6735edc911fe08824346.png)  
 ![](https://resource.dopus.com/uploads/default/original/3X/4/8/48d33ead767391eeb3737f92c1d89d302f729393.png)  
 ![](https://resource.dopus.com/uploads/default/original/3X/9/8/98e2c1d5c1c2304ab48c907c822fcc16363a1bbf.png)  
 ![](https://resource.dopus.com/uploads/default/original/3X/3/4/341ace668678793651c0209359cd5ec29a5e092a.png)  
 ![](https://resource.dopus.com/uploads/default/original/3X/a/f/afae56470032bd42b4ceadf88e72390f7c041491.png)  
 ![](https://resource.dopus.com/uploads/default/original/3X/6/1/61f0fbe8f6f71ee2a49dc2c16f98a57c5bd33dc2.png)

---

<div class="post-metadata">

**Author:** ![tbone](https://resource.dopus.com/user_avatar/resource.dopus.com/tbone/32/25726_2.png) [@tbone](https://resource.dopus.com/u/tbone)\
**Post date:** [June 6, 2025, 12:14pm UTC](https://resource.dopus.com/t/column-git-status/29230/15 "2025-06-06T12:14:42Z")

</div>

Updated to v0.3.4:  
// - fixed "out of range" script errors (for ".git" folder i think)  
// - use more sensible "default" value handling for column values and ".git" folder  
// - new setting for custom status of ".git" data folder  
// - flip change log order

---

<div class="post-metadata">

**Author:** ![tbone](https://resource.dopus.com/user_avatar/resource.dopus.com/tbone/32/25726_2.png) [@tbone](https://resource.dopus.com/u/tbone)\
**Post date:** [June 6, 2025, 12:22pm UTC](https://resource.dopus.com/t/column-git-status/29230/16 "2025-06-06T12:22:24Z")

</div>

> [@Kris](#):
>
> I have tested your latest update and it works 😊 thank you.
> 
> The 'Git-Status' column is currently using text to indicate status: for example "modified".  
> To look more like a status column, how can this be replaced with icons like:

Glad to hear, pushed another update, found some script errors while looking at the current situation, might work even better now.

Regarding the icons, well.. yes, there are inline icons available in DO, these could be used I guess. Maybe read this post and follow the other threads, I just recently came across these type of icons. If the status "strings" get their own script setting, people could use whatever text / icon they would like, maybe I add this when I find the time, but I already spent too much time on this one today already! o))

> [@Secret(?) inline icons or symbols for button labels with \<%...\> syntax](https://resource.dopus.com/t/secret-inline-icons-or-symbols-for-button-labels-with-syntax/55300):
>
> Good morning! o) A user in the german forum posted a button using a label with some kind of placeholder in there to add little icons to button labels (not the actual button icon). I've never seen this before. He did not remember where he picked up t…

---

<div class="post-metadata">

**Author:** ![tbone](https://resource.dopus.com/user_avatar/resource.dopus.com/tbone/32/25726_2.png) [@tbone](https://resource.dopus.com/u/tbone)\
**Post date:** [June 6, 2025, 12:32pm UTC](https://resource.dopus.com/t/column-git-status/29230/17 "2025-06-06T12:32:31Z")

</div>

> [@Kris](#):
>
> The 'Git-Status' column is currently using text to indicate status: for example "modified".  
> To look more like a status column, how can this be replaced with icons like:

Just in case you feel like implementing this yourself, please use a separate (new) set of columns (in this script), I will stick to the textual representation (I don't like icons with no text, it always involves some kind of guessing o) and I think it make sense to have both available (a text based column and one using an icon) at the same time. The text value columns can also be searched through with DO, which you won't really be able to when there are specific icon-identifiers in use you would have to search for.

---

<div class="post-metadata">

**Author:** ![Kris](https://resource.dopus.com/letter_avatar_proxy/v4/letter/k/82dd89/32.png) [@Kris](https://resource.dopus.com/u/Kris)\
**Post date:** [June 6, 2025, 12:51pm UTC](https://resource.dopus.com/t/column-git-status/29230/18 "2025-06-06T12:51:20Z")

</div>

I have update to v0.3.4

Great to hear icons could be used for the status, it would make it even more readable!  
If I understand it well, thanks to your icon finding, you can have DO automatically render text (ex: \<%error\> \<%update\> ) as an icon. So with a map between Git status and these icons it could be used in the 'Git-status' column.

---

<div class="post-metadata">

**Author:** ![tbone](https://resource.dopus.com/user_avatar/resource.dopus.com/tbone/32/25726_2.png) [@tbone](https://resource.dopus.com/u/tbone)\
**Post date:** [June 8, 2025, 12:15pm UTC](https://resource.dopus.com/t/column-git-status/29230/19 "2025-06-08T12:15:01Z")

</div>

[Column.Generic\_Git.js.txt v0.3.6](https://resource.dopus.com/uploads/short-url/8LrhMUkHUlqWFCivoYEZCb7jkaM.txt) (64.6 KB)  
// v0.3.6 - 2025-06-08  
// - added basic icon status column (work in progress)  
// - fixed an issue with blanks in file folder names  
// - move some functions into global context (for better performance)  
// - focus on subfolder only when running "git status" (added path to "status" param as well)

 ![image](https://resource.dopus.com/uploads/default/original/3X/b/a/ba99184633ff430df2bb13c6a7ef8110ab630e64.png)

Just for fun.. o)

---

<div class="post-metadata">

**Author:** ![Kris](https://resource.dopus.com/letter_avatar_proxy/v4/letter/k/82dd89/32.png) [@Kris](https://resource.dopus.com/u/Kris)\
**Post date:** [June 8, 2025, 1:18pm UTC](https://resource.dopus.com/t/column-git-status/29230/20 "2025-06-08T13:18:30Z")

</div>

I have tested your v0.3.6 update. It works great, thank you.  
Is there a way to automatically add the Git Status column as soon as there is a '.git' folder in the folder or any parent folder?

[Next page](https://resource.dopus.com/t/column-git-status/29230.md?page=2)
