DEV Community

Cover image for To `git` or Not To `git` a Vim Session ?
Jonas B. R.
Jonas B. R.

Posted on

To `git` or Not To `git` a Vim Session ?

(This is an excerpt taken from the post: Vim Sessions - Plus: A custom command to save the session, the files, and then exit.)

Should you commit the session files created, to your project’s repository? If the project will be touched by more than one person, that’s something to be discussed with the other part(s).

My suggestion on that, based on the 2 workflows presented before (here), is:

  • Add Sessions.vim to your project's .gitignore file. - Since this auto-created file is now more related to your personal workflow on the project, it could bring more pain than help if committed to the project's repo.
  • Commit PriceUpdate.vim (example) to the project's repository.- If you create a custom session file to help quick maintenance on a stable project, it may be worth sharing with others since it could help anyone to dive in and make specific work without searching for files and content inside the project.

Check the full post about Vim Sessions to know more.

Do you have any other tip or strategy about Vim Sessions? Please leave a comment!

Thanks for reading 🙌 !

Top comments (0)