OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Can't switch to other Branch because of Untracked working tree files

  • Thread starter Thread starter Mahmoud Ali
  • Start date Start date
M

Mahmoud Ali

Guest
i have Created Sub module which should it's content from other git Repo after Creating it and it seem everything is good when i try to Switch to another Branch it give me error

Code:
> git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks checkout Feature/7-SOE_Update --progress
> error: The following untracked working tree files would be overwritten by checkout:
> Application_Layer/Appl_SOC/SOC_Algorithm/SOC_Basic.c
> Application_Layer/Appl_SOC/SOC_Algorithm/SOC_Basic.h
> Please move or remove them before you switch branches.
> Aborting``

i try to use git status to see what's happening --give me up to date
i tried to use ignore = dirty inside .git module file --still i can't switch to other branch i tried to switch by force -- deleted my untracked files

this is the only solution that worked for me git submodule deinit --all git pull rm -rf build rm -rf $RETDEC_INSTALL_DIR but when i switch back to the branch and try to switch to other branchs again the problem return again which doesn't make any sense to repeat this every time to switch to this branch.

also inside this sub module only three files that have untracked state but other files are fine didn't complain about them which i see not making sense at all i mean it should complain about all files right?
<p>i have Created Sub module which should it's content from other git Repo after Creating it and it seem everything is good when i try to Switch to another Branch it give me error</p>
<pre><code>> git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks checkout Feature/7-SOE_Update --progress
> error: The following untracked working tree files would be overwritten by checkout:
> Application_Layer/Appl_SOC/SOC_Algorithm/SOC_Basic.c
> Application_Layer/Appl_SOC/SOC_Algorithm/SOC_Basic.h
> Please move or remove them before you switch branches.
> Aborting``
</code></pre>
<p>i try to use git status to see what's happening
--give me up to date<br />
i tried to use ignore = dirty inside .git module file
--still i can't switch to other branch
i tried to switch by force
-- deleted my untracked files</p>
<p>this is the only solution that worked for me
git submodule deinit --all
git pull
rm -rf build
rm -rf $RETDEC_INSTALL_DIR
but when i switch back to the branch and try to switch to other branchs again the problem return again which doesn't make any sense to repeat this every time to switch to this branch.</p>
<p>also inside this sub module only three files that have untracked state but other files are fine didn't complain about them which i see not making sense at all i mean it should complain about all files right?</p>
Continue reading...
 

Latest posts

Top