Just curious how to switch git repos in multi module intelliJ window. Here Module means completely separate git repos.
When I expand that git label I can see correct git branch in each corresponding module. I was expecting to change that whenever I click on different modules in the project explorer.
my IntelliJ version - 2021.1.2 (Ultimate Edition)
I don't think there is a thing such as switching git repos.
What you see in the bottom-right is the branch that belongs to the currently opened file in your editor. If you look at the branches dialog and scroll to the top, you can view the active branches for all the repos that are connected to your project. So yes, opening a file from a repo seems to be the only way to view the active branch of that repo in the bottom-right.
You can open the branch dialog via Git > Branches, Ctrl + Shift + `, or clicking on the active branch on the bottom-right.
Related
The SVN history of a project in IntelliJ IDEA is missing some revisions, which are present in the Tortoise SVN log.
As you can see in the picture in Tortoise SVN the next revision after 24220 is 24216, but in Intellij IDEA the next revision is 23650.
(To display the history in Intellij IDEA I right-click in the project window on the project root and select from the menu "Subversion > Show History". For the Tortoise SVN log I right-click on the base folder of the project and select "Tortoise SVN > Show log".)
Why is Intellij IDEA Subversion history not displaying these revisions?
EDIT:
r23650 was a commit directly to the branch. Could it be that this revision is not visible in the history in Intellij IDEA, because it made changes to a file not directly under the project root?
Intellij IDEA SVN history is only showing the commits made to the selected folder or files directly located in that folder. Commits which modified files in subfolders are NOT visible. To see all commits made in the branch you have to use "Browse changes..." - located in the context menu under "Subversion".
For those having problems with not displaying complete history in Repository tab, first click on Clear and finally Refresh (pressing Refresh only does nothing).
In a terminal I have switched to a local branch on my project.
When I open Intellij, it still points to Master. And when I open the git branch panel (bottom right of Intellij), I only see Remote branches.
Do you know how to switch to the same local branch in Intellij, and how to display the local branches too?
Thank you.
I had the same issue. Like Dmitrii already said. There is a setting in Inttelij that enabled it for me. It's called "Execute Branch Operations on All Roots".
Setting in Intellij to enable Git Operations on all Repositories
it still points to Master
How do you know? When you are on some branch, IntelliJ will at least show the branch itself in the popup, with a HEAD mark and ability to rename.
It looks like branches popup is attached to some other repo. Make sure the mapping in Settings | Version Control is correct and check the IDE logs for possible errors.
In Intellij Idea 2018.1, when I switch git branch, list of opened tabs is changed (for each branch, own list). How disable this option (in previous version there was another behavior)?
Disable the Restore workspace on branch switching option in Settings | Version Control | Confirmation
Eclipse will highlight the files that I have made changes in git repository, but looks like intellij don't highlight that. Is there any preference that I can configure ?
Go to Settings -> Version Control then edit your project for setting git root. After that IDEA will show all changes in your files.
I need to work on different branches of a project at the same time, so having multiple folders (one for each branch) would be the faster and easier solution.
The problem arises when cloning my own repo: GitHub for Windows will recognize it and automatically move it to the main repository, where i can manage only one branch at a time.
I'm new to GitHub and couldn't find any working solution/workaround for version 1.2.110
Already tried, didn't work:
Github: how to checkout my own repository
Clone Github repo to specific Windows folder?
https://stackoverflow.com/a/7803102/1193335
http://bitdrift.com/post/4534738938/fork-your-own-project-on-github
1 Create a new folder, eg: C:\GitHub\mynewbranch
2 Drag it into GitHub, fill the description fields, uncheck "Push to GitHub" and continue.
3 Open your "Repository settings":
And fill the "Primary remote (origin)" field with your repository url:
4 Click "Open in Git Shell" (below "Repository settings") and type this in the command line:
git remote set-url origin git#github.com:<username>/<repository name>.git
5 Then this:
git pull origin <branch name>
6 Switch to the desired branch in GitHub, enjoy :-)
P.S. to update future changes from the master:
git pull origin master