diff --git a/aider/website/docs/git.md b/aider/website/docs/git.md index 20712b72f..9679b2ea8 100644 --- a/aider/website/docs/git.md +++ b/aider/website/docs/git.md @@ -22,9 +22,16 @@ This keeps your edits separate from aider's edits, and makes sure you never lose ## In-chat commands -Aider also allows you to use in-chat commands to `/diff` or `/undo` the last change. -To do more complex management of your git history, you cat use raw `git` commands, -either by using `/git` within the chat, or with standard git tools outside of aider. +Aider also allows you to use +[in-chat commands](/docs/usage/commands.html) +to perform git operations: + +- `/diff` will show all the file changes since the last message you sent. +- `/undo` will undo and discard the last change. +- `/commit` to commit all dirty changes with a sensible commit message. +- `/git` will let you run raw git commands to do more complex management of your git history. + +You can also manage your git history outside of aider with your preferred git tools. ## Disabling git integration @@ -36,6 +43,8 @@ While it is not recommended, you can disable aider's use of git in a few ways: ## Commit messages +Aider sends the `--weak-model` a copy of the diffs and the chat history +and asks it to produce a commit message. By default, aider creates commit messages which follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). @@ -45,6 +54,7 @@ with the `--commit-prompt` option. You can place that on the command line, or [configure it via a config file or environment variables](https://aider.chat/docs/config.html). + ## Commit attribution Aider marks commits that it either authored or committed. diff --git a/tests/basic/test_commands.py b/tests/basic/test_commands.py index ee4fbf082..40ae4fd5e 100644 --- a/tests/basic/test_commands.py +++ b/tests/basic/test_commands.py @@ -1037,7 +1037,7 @@ class TestCommands(TestCase): os.chdir(subdir) # Test the /read-only command using git_root referenced name - commands.cmd_read_only("subdir/test_read_only_file.txt") + commands.cmd_read_only(os.path.join("subdir", "test_read_only_file.txt")) # Check if the file was added to abs_read_only_fnames self.assertTrue( @@ -1048,7 +1048,7 @@ class TestCommands(TestCase): ) # Test dropping the read-only file using git_root referenced name - commands.cmd_drop("subdir/test_read_only_file.txt") + commands.cmd_drop(os.path.join("subdir", "test_read_only_file.txt")) # Check if the file was removed from abs_read_only_fnames self.assertFalse(