# Re-enabled a folder set as untracked

2 messages from 2019-06-10 to 2019-06-21. Participants: Samuel Rabini, Philip Oakley.
Thread: https://gitlist.dev/t/51283

## Samuel Rabini, 2019-06-10 20:11

Subject: Re-enabled a folder set as untracked
Message-ID: <4AB7124D-0704-4C6E-B3B1-C0C1BF5C89B0@gmail.com>
URL: https://gitlist.dev/e/4AB7124D-0704-4C6E-B3B1-C0C1BF5C89B0%40gmail.com

```
Hi,

Using SourceTree I issue the Stop Tracking command (I think it executed the add untracked https://git-scm.com/docs/git-add#Documentation/git-add.txt-adduntracked). Is there anyway to revert this command and re-enable the folder? I was able to re-add to the index all files into the folder by the git add -f pathtofolder command, but new files are not asked to be committed and pushed.

Thanks in advance,

Samuel Rabini
Software Architect
M: +39 339 81 24 118
samuel.rabini@gmail.com | www.samuelrabini.com <http://www.samuelrabini.com/>
 
 



```

## Philip Oakley, 2019-06-21 09:11

Subject: Re: Re-enabled a folder set as untracked
Message-ID: <5b183aa2-fa8d-6278-5f87-23f00d16c0d8@iee.org>
URL: https://gitlist.dev/e/5b183aa2-fa8d-6278-5f87-23f00d16c0d8%40iee.org
In-Reply-To: <4AB7124D-0704-4C6E-B3B1-C0C1BF5C89B0@gmail.com>

```
On 10/06/2019 21:11, Samuel Rabini wrote:
> Using SourceTree I issue the Stop Tracking command (I think it executed the add untracked https://git-scm.com/docs/git-add#Documentation/git-add.txt-adduntracked). Is there anyway to revert this command and re-enable the folder? I was able to re-add to the index all files into the folder by the git add -f pathtofolder command, but new files are not asked to be committed and pushed.
>

I don't use SourceTree. I doubt that your suggested 
git-add.txt-adduntrackedis the command used, as that is within a command 
line sub-menu.

I would guess that the command was a variant of 
https://git-scm.com/docs/git-rm with an option to retain the working 
tree file.

You ask about re-enabling the tracking of a _folder_ - this is a 
misunderstanding as git only tracks the named files, rather than 
complete folders.

To re-track a file, simply use `git add <pathspec>` (see the 
documentation notes about how the pathspec can add the contents of a 
complete folder..).

--
Philip

```
