如何在NetBeans中将特定的文件行分阶段进行混排? [英] How can I stage specific lines of file to git in NetBeans?

查看:164
本文介绍了如何在NetBeans中将特定的文件行分阶段进行混排?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对使用NetBeans很陌生,今天我遇到了一个问题。我曾经只使用部分文件来做出更好的提交。



我使用vim和逃逸插件,我可以将特定的行从unstaged移动到staged 。



我可以通过调用 git add -p 来做一个解决方法,但直接从NetBeans IDE执行它会很好。



有没有一种神秘的方法可以通过点击某个地方并阶段特定的行来实现它?

解决方案使用 git add -p 不是解决方法,而是做这件事的方法。



如果你需要它更加舒适,那么将 git gui 作为

不管你是否以某种方式工作,都可以使用这个工具:这完全是我之所以主张为一项任务使用一种工具,而不是试图在o东北。

netbeans是否会忽略我的git pre-commit hook?,我讨论过NetBeans的Git实现远未完成。 git add -p 似乎没有包含在 NetBeans Git集成计划

NetBeans使用 jgit jgit 没有提供部分文件的部分,只有 AddCommand ,它提供了 addFilepattern()。因此,您的问题的答案是,它不起作用。


I'm quite new to using NetBeans and today I faced a problem. I have used to stage only part of files to make better commits.

I have used vim and fugitive plug-in, where I can just move specific lines from unstaged to staged.

I can do a workaround by calling git add -p, but it would be nice to do it straight from NetBeans IDE.

Is there a mysterious way to do it simple by clicking somewhere and stage specific line(s)?

解决方案

Using git add -p is not a workaround but the way to do it.

If you need it more comfortable, fire up git gui as External Tool out of NetBeans and use it to stage lines manually.

Regardless if you get that working somehow or not: this is exactly the reason why I advocate using one tool for one task and not trying to do everything in one.

In Does netbeans ignore my git pre-commit hook?, I discussed that the Git implementation of NetBeans is far from being complete. git add -p does not seem being contained in the NetBeans Git integration plan.

NetBeans is using jgit. jgit does not provide means to stage parts of files, there's only the AddCommand that provides addFilepattern(). So the answer to your question is no, it won't work.

这篇关于如何在NetBeans中将特定的文件行分阶段进行混排?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆