Change git branch on eclipse

This is the first time I do this. I imported the git project in eclipse. Then I used the wrapper to create another branch and check for a new branch.

Updates the imported project in Eclipse enough to tell Eclipse that we are working on a newly created branch?

thanks

+6
source share
3 answers

Right-click your project and select Command β†’ Branch to create new branches or switch between existing branches. You can also switch branches in the History window.

+3
source

Actually, I don’t think you even need to update the project. That is, if you have "eGit" installed, and your projects are already set up as git projects (they should be, because in most cases, egit does this automatically).

Whenever you run git commands on the shell (outside of eclipse), egit will automatically update the projects for you and update their status when you return to Eclipse.

If you do not use egit, then yes, you must update the projects manually, but that’s all you would need to do, since running the git check-my-branch 'command in the shell has already changed the files on the disk should be those from "my- branch ".

+2
source

In fact, when you work with eclipse, eGit is a very cool tool built into eclipse that allows you to do all of git, for example

  • git check for new branch
  • git create a new branch
  • git stash
  • even review your unexplained changes (select files and avoid the complexities caused by git add.)
  • and finally commit.

Read here to find out more. Eclipse Egit User Guide This way you get all the materials of the version repository in one place when you code.

Git Repository view in Eclipse

So, to answer your question, yes, when you check out a new branch even at the command line, your changes will be reflected in eclipse.

0
source

Source: https://habr.com/ru/post/971960/


All Articles