开发者

basic egit operations

I have installed egit, and by using Team - Share - commit, assume that I now have a copy of the entire project in the .git directory.

So I do some work on the project and do another commit.

Now if I want to work on开发者_高级运维 the first commit version what steps are needed?

Which egit command gets the saved project and how do I keep it separate from the current project.

Will it show up somewhere that also appears in the Navigation window of Eclipse?

Very basic stuff but as you can tell I am somewhat unclear about how the whole thing works.

I've googled as much as I can around tutorials but I find it difficult to relate to the terms and concepts that seem to be taken for granted.


One solution is to click the reset button (or menu team > Reset), and do a reset --hard on the refs you want.

Here is me working on V2 on my "HelloWorld" App, wanting to redo it completely, starting from V1 which in in master HEAD:

basic egit operations


But if you don't want to lose anything (even though a reset --hard doesn't lose any commits, they are still available through the reflog), another option is to use the history view to create and checkout a new branch from a previous commit:

basic egit operations

As you can see, your content is reset to that previous commit, referenced by a new branch (i.e. you can work without being in a DETACHED HEAD mode as in this question), and the package explorer reflects said new branch:

basic egit operations

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜