Can I only view local or remote branches in the tree view? - gitkraken

I have too many remote branches in the track for the tree view, but I only want to view my local branches in the tree. Is there an option to do this?

Yes,
In the REMOTE section on the left side (where you can see origin branches),
hover your mouse above the empty square next to the origin icon like that:
And click the green eye icon ("Hide in the graph") which make your remote branches hidden and the icon will be changed to:
By the way, you can hide and show like that every single branch (local and remote) as well.

Related

How do I use the VS Code Timeline to do the equivalent of git revert?

In VS Code under the timeline dropdown there is list of commits. Clicking on a commit causes a split page to appear, one red on the left and the other green on the right. How do I revert to cause the code in the file to go from green back to red? The top right has a ellipsis that when clicked there is a option to 'revert selected ranges' but when trying to select the ranges and clicking the 'revert selected ranges nothing happens'? Does the 'revert selected ranges' not do the equivalent of git revert?
Under the timeline if I right click and copy commit ID and then in the terminal run git revert it does what is excepted, created a new commit which reverts the changes

Explorer icon showing the git changes count in VS Code

As shown in the below image the Explore icon has the badge showing the count of my git changes.
I don't know how this happened some how unexpectedly I did something and this behaviour started.
How do I fix it and get the default behaviour of the git icon showing the changes count?
You accidentally moved the SOURCE CONTROL View to the Explorer bar.
Is this view not present in the SCM Bar?
I have tried to do it with the mouse but could not recreate. It created a new SCM icon in the Activity Bar with 1 view.
To move all the views to the default position execute command: View: Reset View locations
That Explorer icon badge is supposed to show the number of unsaved files with changes - it doesn't show the number of git changes except coincidentally.
I don't think the Explorer unsaved files count badge can be turned off. You can change its color or opacity but that would affect all badges (like the scm badge).
Thanks to this answer the GIF attached in answer was able to help me to fix the issue.
I just dragged the Source Control to the sidebar and it worked.

Intellij - How to compare two commits with each other? [duplicate]

You probably know this window where you can see the diffs between a commit to ONE commit older.
Do you know how can I see exactly the same comparison, but between a commit and a previous commit which is not necessarily ONE before the current one.
I know that I can do it per one file, but I want to do it for the whole project.
You can select any number of commits in the git log window (using shift/ctrl and click or cursor keys) and the right-hand pane will show the cumulated differences.
In IntelliJ, there is no command or action to compare exact revisions, unfortunately.
Here are couple related requests:
https://youtrack.jetbrains.com/issue/IDEA-125616 and https://youtrack.jetbrains.com/issue/IDEA-100431
However, there is a way to see what has changed between two commits. To do so you need to go to the Version control - Log tab and select the entire range between wanted commits (e.g select the later commit, then scroll down to the older commit and click on it with Shift). In the right pane showing changed files you will see all the changes.
Another way to do it:
Open the 1: Project panel
Right-click your project's root folder
Select Git → Show History from the menu
This opens up a completely different view of the git log, where you can do exactly what you'd expect to be able to from the main (9: Version Control) git log... namely:
Select (only!) two commits
Click Compare
From the pop-up dialog that appears, you can select any file and press Ctrl-/Cmd-D (or right-click and select the only menu item) to see the changes.
Unfortunately, there doesn't seem to be any way to "pin" that view to your workspace, though it hovers on top as long as you need it.
Hopefully one day JetBrains will create a "best of both worlds" merged version of these UIs, so we can just compare stuff from the main Version Control log. To add to the list of JetBrains tickets for this issue listed in another answer... the oldest one appears to be https://youtrack.jetbrains.com/issue/IDEA-86480
Also in CLion (I think in other JetBrains IDE-s it's the same):
open VCS log
filter VCS log via other branch (e.g., personal/sherstennikov/krt-23941)
top n commits must be the range on other branch we want to diff against current branch
select other branch HEAD with left click
right click on it
select in menu 'Branch ' (e.g.: Branch 'personal/sherstennikov/krt-23941')
expand via arrow on the right and click 'Compare with Current'
you get a window (see pic) 'Comparing with in root '
top left pane contains range of commits from other-branch
bottom left pane contains log of current-branch
right pane contains list-of-files-which-differ between commit/several-selected-commits (if range selected, list of files is cumulative) in other-branch and HEAD (or maybe selection) in current-branch
now you can click on file in right pane to get it's diff between selected versions in a separate window (let's call it file-diff-between-other-and-current-window)
10.also in file-diff-between-other-and-current-window right on the left of unified/side-by-side viewer selector, there's a control to switch between files in the aforementioned list-of-files-which-differ

Open egit code comparison in floating tab rather than splitscreen

When using Eclipse (Mars), I often use the Git staging view maximized. When I double click on an entry, I want the comparison view floating over the maximized view.
This is how I do it:
Go to Git staging view.
Maximize it (Ctrl+M).
Git staging fills the screen.
Double click on entry.
Compare current and index view starts in a splitscreen, pushing Git staging to the lower third of the screen.
Set focus to Git staging view.
Press Ctrl+M again.
Original Layout restored.
Press Ctrl+M yet again.
Git staging fills the screen.
Double click on entry again.
Compare current and index view starts in an overlay.
Is there any way to configure Eclipse in order to avoid having to go through steps 5 to 11?
It seems that the comparison editor forcely opens in a splitscreen every time it gets started and can be shown in a floating tab when it's only getting updated.
Thus, a workaround is to get into the habit of not closing it and keeping it opened in the back all the time.

Do not need Git Synchronization

I know this is a foolish question. When I do a git compare (Project -> Right click -> Compare with), comparison opens in Synchronization panel instead of Compare window panel.
I am unable to understand git synchronization and thus not able to compare my branches.
I don't want git synchronization window panel. I need a git compare tree panel.
Please Help
The synchronization (since Egit 3.1) is for the difference between the working tree (including not committed changes) and a branch or tag.
As mentioned in "Compare editor and Synchronize View":
If you use any of the submenu actions of Compare With on a single file, a compare editor will be shown, otherwise (since EGit 3.1) the Synchronize View will be opened that lets you browse the changes;
by double-clicking on a changed file in this view, a compare editor will be opened for this file.
In the toolbar of the Synchronize View you can select the Sychronize Model you want to use for presenting the changes you are inspecting.
To get only a compare view, you can also follow the section "Compare working tree with last commit":
The difference between a resource in the current working directory and in the last commit in the current branch can be viewed from the context menu Compare With > HEAD revision.
This feature is also available in the Commit dialog.
Double clicking on an entry in the Commit dialog opens a compare dialog.