[英]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. 我对
Git
很Git
也许我不喜欢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 add
和git 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.