mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 01:04:59 +00:00
make .gitignore before making repo
This commit is contained in:
parent
61565b66e1
commit
4e40c8ac15
1 changed files with 5 additions and 2 deletions
|
@ -27,6 +27,10 @@ def setup_git(git_root, io):
|
|||
if not io.confirm_ask("No git repo found, create one to track GPT's changes (recommended)?"):
|
||||
return
|
||||
|
||||
git_root = str(Path.cwd().resolve())
|
||||
|
||||
check_gitignore(git_root, io, False)
|
||||
|
||||
repo = git.Repo.init(Path.cwd())
|
||||
global_git_config = git.GitConfigParser([str(Path.home() / ".gitconfig")], read_only=True)
|
||||
with repo.config_writer() as git_config:
|
||||
|
@ -38,8 +42,7 @@ def setup_git(git_root, io):
|
|||
io.tool_error('Update git email with: git config --global user.email "you@example.com"')
|
||||
|
||||
io.tool_output("Git repository created in the current working directory.")
|
||||
git_root = str(Path.cwd().resolve())
|
||||
check_gitignore(git_root, io, False)
|
||||
|
||||
return git_root
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue