GCC make后清理目录
使用“make”编译源代码后如何清理目录以执行“git commit”?
或者你在提交 git 时做了什么?
How can I clean up directory after compiling source codes with 'make', to do 'git commit'?
Or what you do when commiting git?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您应该有意识地提交更改,而不仅仅是目录的状态如何。如果你只承诺你打算承诺的事情,那么问题就没有意义。
我几乎总是使用 git add -p 并实际上关注所有发生变化的事情。我一整天都会更改很多代码,有时我会在没有提交的情况下花费比我想要的时间更长的时间。在完成之前,很容易将所有工作分成几个提交。
也就是说,我确实维护了
.gitignore
,并且经常使用git clean
来擦除目录。You should be consciously committing changes, not just whatever the state of your directory is. If you only commit what you intend to commit, the problem is moot.
I almost always use
git add -p
and actually pay attention to everything that's going into a change. I change a lot of code throughout the day, and sometimes I'll go longer than I'd like without committing. It's easy to split up all that work into a few commits before finishing it up.That said, I do maintain a
.gitignore
and I quite often usegit clean
to wipe the directory.您可以使用 .gitignore 文件在提交时忽略文件:
http://help.github.com/git -ignore/
您还可以在 Makefile 中创建一个“干净”规则,该规则将删除您不想提交的任何文件。
You can use a .gitignore file to ignore files when commiting:
http://help.github.com/git-ignore/
You can also create a 'clean' rule in your Makefile that would delete any files you don't want to commit.