benbrastmckie / .config

NeoVim configuration optimized for writing in LaTeX
332 stars 281 forks source link

Git errors #135

Closed ammukuttu closed 5 hours ago

ammukuttu commented 5 hours ago

After opening a saved session and then trying to commit the edits within nvim, I see error:

Not in a git repository. Create a new repository? (y/n)

ammukuttu commented 5 hours ago

This error was due to not opening nvim from the directory which has the source files to be committed. The saved session should match the directory/folder name where the .git folder for those files exist.

By deleting the session and then opening the file from source location as mentioned above, saving that as a session, no more git errors

benbrastmckie commented 5 hours ago

Thanks for documenting this! One other point worth mentioning is space,a,u will change the directory to buffer currently open which can be useful before saving a session in case you started from somewhere else.