简体   繁体   中英

Sourcetree custom action to edit .gitignore file (mac)

My aim is to easily edit the .gitignore file corresponding to a particular git local repository (graphically).

I think it would be possible to add a custom action so when we right-click a repository line of the main SourceTree window, it would directly open a text editor with the corresponding repository's .gitignore file. How to add that custom action?

In fact, i'm surprised there's not already a simple way to do that.

You can add a Custom Action , to achieve that.

Go to SourceTree > Preferences > Custom Actions > Add ..

For example, if you want to edit your .gitignore file using SublimeText on OSX you can use this settings:

Script to run:

 /Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl 

Parameters:

 $REPO/.gitignore 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM