Binary executables bloat .git history and cause storage issues on constrained upstream repos. Added recovery procedure: git reset --soft HEAD~N, git reset HEAD <file>, delete, recommit.
1.9 KiB
1.9 KiB
Notes on calling tools
- About
run_in_terminalor some other similar tools that can make calls to external programs, be very careful about what programs/commands you call - some are blocking indefinitely by nature, like running servers, long-running monitors, etc. If you would like to execute such commands, make sure to run them in a non-blocking way, for example run/spawn them in another temp terminal session. Otherwise, your agent will be hung on the waiting indefinitely. - About
AskUser,get_user_requestor other similar tools that can retrieve latest user input, if available, make sure to call them AGGRESSIVELY once you finished all tasks at hand, so as to AVOID ending the current task/work/session prematurely. NEVER end the current task/work/session on your own, the user will keep adding new instructions into this kind of tools in the background. You can be missing out CRITICAL instructions from user when you failed to call them aggressively. Also, sometimes these tools can fail to return any results due to technical issues. Just try to call again when that happens. - About
gitcommands: always usegit --no-pager(or pipe output through| Out-String) when running git commands in the terminal. Without this, git may invokelessas a pager, causing the terminal to hang waiting for user interaction. Example:git --no-pager log --oneline -10,git --no-pager diff,git --no-pager status. Similarly for any other command that may invoke a pager (e.g.man,less). - About
gitcommits: NEVER commit compiled binaries (executables, .exe, .dll, .so, .dylib, etc.) to the repository. Always ensure .gitignore excludes them before committing. If a binary is accidentally committed, usegit reset --soft HEAD~Nto undo commits,git reset HEAD <file>to unstage, then delete the file and recommit. Large binaries bloat the .git history and cause storage issues on constrained upstream repos.