简体   繁体   English

在使用IDE(Eclipse)进行开发的同时使用控制台使用git时应考虑哪些事项?

[英]What are the things should be considered while using git using console while developement using IDE(Eclipse)?

I am very new to Git perhaps I don't like eclipse's git plugin. 我对GitGit也许我不喜欢eclipse的git插件。 So I prefer to use git using Linux terminal. 所以我更喜欢在Linux终端上使用git。
So consider I am creating a branch using the terminal 所以考虑我正在使用终端创建分支

git branch test
git checkout test

And I am typing the code in a file without refreshing the eclipse java project will my changes reflect in that branch. 而且我在文件中键入代码而没有刷新eclipse Java项目,我的更改将反映在该分支中。

Also let me know the exceptional cases one should consider while using git with eclipse . 还让我知道在将git与eclipse一起使用时应该考虑的特殊情况。

Not a whole lot. 不是很多。 The big ones are to make sure that the local clone is known to Eclipse by adding it to the Git Repositories View, and that the Automatic refresh options on the main Git preference page and Refresh using native hooks or polling on the Workspace preference page are enabled. 最重要的是通过将本地克隆添加到Git存储库视图中来确保Eclipse知道该本地克隆,并确保在主Git首选项页面上启用了自动刷新选项,并在工作空间首选项页面上启用了使用本机钩子或轮询刷新

There's nothing wrong with using the git command for your work and having eGit installed just to make modifications and branch information more immediately visible in the UI. 使用git命令进行工作并安装eGit只是为了使修改和分支信息在UI中更直接可见,这没什么错。

You need to add and commit the changes by git add and git commit command so that they get reflected in your current working branch. 您需要通过git addgit commit命令添加并提交更改,以使更改反映在您当前的工作分支中。 See documentation here : 在这里查看文档:

https://git-scm.com/docs/git-add https://git-scm.com/docs/git-add

https://git-scm.com/docs/git-commit https://git-scm.com/docs/git-commit

Also, to create a new branch 'test' and checkout it, you can use: 另外,要创建一个新的分支“ test”并检出它,可以使用:

git checkout -b test

rather than : 而不是 :

git branch test
git checkout test

Since you are very new to Git, I would suggest you to go through this tuorial: https://try.github.io/ 由于您是Git的新手,因此建议您阅读以下教程: https ://try.github.io/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Eclipse IDE中使用Java中的IO流时,文件将位于何处? - Where the file will be located while using IO Streams in Java In Eclipse IDE? 使用Eclipse IDE调试时如何检查本地方法变量? - How to check local method variable while debugging using eclipse IDE? 构建框架时需要考虑的事项 - Things to be considered while building a framework 使用Eclipse IDE部署网站有哪些弊端? - What are the drawbacks of deploying a website using the Eclipse IDE? 在Eclipse中使用TableColumnLayout时出现AssertionFailedException - AssertionFailedException while using TableColumnLayout in eclipse 当程序在Eclipse IDE中运行且没有任何错误时,无法使用Java Applet中的FileReader打开文件 - Unable to open a file using FileReader in java applet while the programs runs without any error in Eclipse IDE 如何删除使用eclipse插件创建的IDE中存在的默认内容(功能)? - How to remove default things(functionalities) present in the IDE which was created using eclipse plugins? 我应该在作业中使用什么while循环条件? - What while loop condition should I be using in my assignment? 使用CQL jdbc驱动程序时应该是什么连接字符串 - What should be the connection string while using CQL jdbc driver Eclipse中的Java控制台,但是如果用作Jar怎么办? - Java Console In Eclipse, But What If Using As Jar?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM