# Where do backup files go when I ignore them by \*.jl.bak in .gitignore file?

**URL:** https://discourse.julialang.org/t/where-do-backup-files-go-when-i-ignore-them-by-jl-bak-in-gitignore-file/121504
**Category:** New to Julia
**Tags:** github, pluto, notebooks
**Created:** [October 20, 2024, 2:11pm UTC](https://discourse.julialang.org/t/where-do-backup-files-go-when-i-ignore-them-by-jl-bak-in-gitignore-file/121504 "2024-10-20T14:11:23Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![selinguler94](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/selinguler94/32/212737_2.png) [@selinguler94](https://discourse.julialang.org/u/selinguler94)
#### Post date: [October 20, 2024, 2:11pm UTC](https://discourse.julialang.org/t/where-do-backup-files-go-when-i-ignore-them-by-jl-bak-in-gitignore-file/121504/1 "2024-10-20T14:11:23Z")

</div>

I want to keep the backup files because I am asked to keep the old versions of the updated code, but I also don’t want to host them in Github pages so I placed them in .gitignore. But where did they go?

I created a move.sh file like the following to keep the backup files but it didn’t work.

#!/bin/bash  
for file in \*jl.bak; do  
if [-e “$file”]; then  
mv “file" ".backups/{file%.bak}\_$(date +%Y%m%d%H%M%S).bak”  
fi  
done

Where are the backup files generated by Pluto when I update the notebook?

---

<div class="post-metadata">

### Author: ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)
#### Post date: [October 20, 2024, 2:18pm UTC](https://discourse.julialang.org/t/where-do-backup-files-go-when-i-ignore-them-by-jl-bak-in-gitignore-file/121504/2 "2024-10-20T14:18:00Z")

</div>

FTR I don’t know anything about Pluto.

> [@selinguler94](#):
>
> I want to keep the backup files because I am asked to keep the old versions of the updated code, but I also don’t want to host them in Github pages so I placed them in .gitignore.

That’s what version control (Git, in this case) is for. You don’t need backup files if you’re doing proper version control. You certainly don’t want the backup files _in_ version control.

---

<div class="post-metadata">

### Author: ![selinguler94](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/selinguler94/32/212737_2.png) [@selinguler94](https://discourse.julialang.org/u/selinguler94)
#### Post date: [October 20, 2024, 2:33pm UTC](https://discourse.julialang.org/t/where-do-backup-files-go-when-i-ignore-them-by-jl-bak-in-gitignore-file/121504/3 "2024-10-20T14:33:20Z")

</div>

Thanks for the clarification. I am not very familiar with Git, so with the Git version check will I be able to work with the exact old version of the Pluto notebook? Like the exact .jl file. That may be why I consider the backup files generated by Pluto because it seems practical.

---

<div class="post-metadata">

### Author: ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)
#### Post date: [October 20, 2024, 2:46pm UTC](https://discourse.julialang.org/t/where-do-backup-files-go-when-i-ignore-them-by-jl-bak-in-gitignore-file/121504/4 "2024-10-20T14:46:33Z")

</div>

Yeah, version control was invented to improve on the “backup file” workflow. Learn Git and you’ll never want backup files again.
