Is it possible to 'git update-index --skip-worktree [file]' from the Sourcetree GUI Edited

tl;dr Can we do `update-index --skip-worktree [filename]` from the Sourcetree GUI?

---

We have some configuration files that we would like to ignore changes on whilst we're developing locally.

We are aware of the "rename the file" approach to config files (have a file in git like 'config.default.php' and rename it to 'config.php' when you set up) but on reading further Git provides a flag `update-index --skip-worktree` that we could use on the command line but we haven't located a way to do it from Sourcetree.

In the end, we may opt for the `default` file approach for our config files, but we would like to try this as a general learning point to increase our understanding of Git. It may be useful in other situations.

Sourcetree may also be intentionally leaving this sort of functionality out so users aren't confused by more options. I would understand that reasoning.

Thanks for reading.

 

Appendix: posts that led me to ask this question

Git documentation on `update-index --skip-worktree`https://www.git-scm.com/docs/git-update-index.

Stackoverflow question where people are trying to resolve similar workflow things where `--skip-worktree` is sometimes suggested as an option:

Question where people work around limitations in Sourcetree GUI (we may end up just doing this):

1 answer

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

568 views 1 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you