[英]Is there a way to git add changes in the currently active file in VS code?
I often only want a commit to be in reference to a specific file I've updated.我通常只希望提交引用我已更新的特定文件。 I find myself grabbing the file path and running git add {filepath} a lot.
我发现自己经常抓取文件路径并运行 git add {filepath} 。 Is there a VS code shortcut or some sort of zsh script I can use to get the current file path from the command line?
是否有 VS 代码快捷方式或某种 zsh 脚本可用于从命令行获取当前文件路径?
you can use the '.'您可以使用“。” like
git add .
像
git add .
it will add the file/files that have changes at that point of time, then you can just git commit
it.它会添加在那个时间点发生变化的文件/文件,然后你可以
git commit
它。 Thus not needing the full path.因此不需要完整路径。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.