The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Untracked files in sunmodule

Mahmoud
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 16, 2024

Hello

i have problem that i have one branch(calc branch) with submodules and i have merged this branch with Release Branch and the project goes on but later i decided to switch back to that branch(calc branch) the source tree doesn't allow me to do that saying there is untracked file even i'm sure i have committed everything but i noticed the .gitmodules file is different in both Branch what should i do to solve this problem and able to switch to the other branch.

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Martin Runge
Community Champion
June 17, 2026

Hi @Mahmoud

Welcome to the Atlassian community!

Switching branches fails because Git blocks modifications when the target branch contains different submodule commit mappings. Cleaning untracked build files using git submodule foreach --recursive git clean -xfd and updating pointers via git submodule update --init --recursive immediately forces your submodules to align with your active branch and clears the checkout error.

TAGS
AUG Leaders

Atlassian Community Events