Search code examples
eclipsegitintellij-ideaversion-controlrtc

Automaticlly fetch changes on project opening ( IntelliJ Git)


Coming from world of Rational Team Concert (Eclipse), to other project that is on Git (IntelliJ) I'm trying to understand this:

Eclipse (RTC)

In RTC I was used to look in TAB (Pending Changes) under Incoming before coding - looking what other team members alredy commited in meantime. On starting Eclipse or button refresh this section of pending changes would automatically refresh with committed changes made by other team members.

Intellij IDEA (GIT)

I'm looking same funcitionality under TAB(Version control) - TAB(Log). Refresh button is not behving in same manner. Am I wrong but only way to see is there new commited changes on origin/master is to use Menu: VCS - Git - Fetch. Remote commited changes not visible

Question is: Is there some settings that would automatically fetch ( not pull) other team members commits ?


Solution

  • The Pending changes takes advantages of the centralized model of RTC, delivering change sets to a common stream.

    In Git, you need to fetch indeed in order to see what was delivered to a common remote Git repository.

    Fetch will be executed immediately after selecting the action.
    Once finished, a confirmation dialog will be shown displaying information about the fetched data and/or error messages:

    https://wiki.eclipse.org/images/3/3d/Egit-3.1-FetchResultDialog.png

    You can then pull (for merging) or pull --rebase in order to replay your own local commits on top of the updated origin/<yourBranc>, before pushing back.

    Actually, if you just fetched, you can (instead of pull), merge origin/<yourBranch> or rebase origin/<yourBranch>