# How to make Obsidian rename work with git?

**URL:** <https://forum.obsidian.md/t/how-to-make-obsidian-rename-work-with-git/22173>\
**Category:** Basement\
**Tags:** sync\
**Created:** [August 7, 2021, 5:09pm UTC](https://forum.obsidian.md/t/how-to-make-obsidian-rename-work-with-git/22173 "2021-08-07T17:09:35Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![datachampion](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/d/c2a13f/32.png) [@datachampion](https://forum.obsidian.md/u/datachampion)\
**Post date:** [August 10, 2021, 9:26pm UTC](https://forum.obsidian.md/t/how-to-make-obsidian-rename-work-with-git/22173/2 "2021-08-10T21:26:17Z")

</div>

I contacted the developer of the [Obsidian git community plugin](https://forum.obsidian.md/t/obsidian-git-plugin-for-automatic-vault-backup-with-git/7790), who was amazing and replied really quickly. It turns out I just didn’t understand how to use git properly so I’m posting the answer in case anyone makes the same mistake.

I was running `git status` after renaming notes in Obsidian and getting concerned because it looks like git sees it as a file deletion and recreation. Turns out I should have had the confidence to run `git add`, which detects the rename. You can confirm this by running `git status` again afterwards.

`git mv` (which I’ve always used in the past) just renames and adds the file(s) to the staging area.

So I had no need to worry: git does work nicely with the Obsidian rename function. I just needed to use `git add` as normal to add the renamed files to the commit.

---

_[View the full topic](https://forum.obsidian.md/t/how-to-make-obsidian-rename-work-with-git/22173)._
