Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To disable the Submodule Changes for Bitbucket app for a specific submodule in a repository, you need to add a special property in the .gitmodules file using the following Git command:


Code Block
git config --file .gitmodules submodule.<name>.ignoreChanges true

In this command, <name> is the submodule name specified in the [submodule "<name>"] section of the .gitmodules file. The changes will be applied after you commit and push them. 

Ex.: you have if you have a submodule named "library", the .gitmodules file will be the following:

Code Block
[submodule "library"]
path = library
url = https://bitbucket.company.com/scm/sm/library.git

In this case, your command that will turn off the app for this submodule will be the following:

Code Block
git config --file .gitmodules submodule.library.ignoreChanges true

As a result, the .gitmodules file will change like this:

Code Block
[submodule "library"]
path = library
url = https://bitbucket.company.com/scm/sm/library.git
ignoreChanges = true