<p>Do not store your generated binaries in git. Git stores every version of a binary as a full new version, not just the changes.
Your projects must be setup in the way that the binaries can be rebuilt anywhere.</p>
<p>Then in the pipeline your code is copied to a second directory structure and the projects will build and generate the binaries for you. From there unit tests are done and whatever more is in the pipeline.</p>
<p>Use
<code>git rm</code> to remove them from the repo
(optional)
<code>git filter-branch</code> to remove them from old commits
<code>git gc --prune=now</code> to garbage collect them from the ..git directory</p>

CC BY-SA 4.0
2022-11-17T06:12:27.863Z
2022-11-17T06:12:27.863Z
Serve Laurijssen
<p>I have an existing repository in Azure DevOps that is currently tracking various /obj, /bin files (.dll, .pdb, .cache, etc.). I don't want to track these anymore; however I am worried that if I delete these files from my repository, then the project will break when I try to release it using a pipeline. Are these safe to exclude and delete, or do I need to manually include them somewhere? I don't have a good understanding of how these files are generated or what they're used for. Thanks.</p>

<git>
Can you delete project binaries from an Azure Devops repo
shlkp
# Can you delete project binaries from an Azure Devops repo

(Asked by: username_0 on 2022-11-16)

I have an existing repository in Azure DevOps that is currently tracking various /obj, /bin files (.dll, .pdb, .cache, etc.). I don't want to track these anymore; however I am worried that if I delete these files from my repository, then the project will break when I try to release it using a pipeline. Are these safe to exclude and delete, or do I need to manually include them somewhere? I don't have a good understanding of how these files are generated or what they're used for. Thanks.

**Tags:** git


---

## 1 answers

### Answer by username_1 on 2022-11-17. Score: 1 | Accepted answer

Do not store your generated binaries in git. Git stores every version of a binary as a full new version, not just the changes.
Your projects must be setup in the way that the binaries can be rebuilt anywhere.

Then in the pipeline your code is copied to a second directory structure and the projects will build and generate the binaries for you. From there unit tests are done and whatever more is in the pipeline.

Use
`git rm` to remove them from the repo
(optional)
`git filter-branch` to remove them from old commits
`git gc --prune=now` to garbage collect them from the ..git directory


---

