Eclipse git commit changes window doesn't appear - eclipse

When ever I commit a file in my project the commit changes window doesn't appear but instead focus is shifted to the git staging window. How do I get the commit changes window to appear again?

Go to Preferences > Team > Git > Committing and uncheck "User Staging View to commit". Hola you will see your old favorite Commit Changes Window.

As nitind, this is mostly answered in this post:
https://waynebeaton.wordpress.com/2016/05/16/git-staging-view/

Related

View file changes in git in eclipse

I can view changes made to an individual file in git (history) from the terminal.
How do I view all changes (history) to individual files in eclipse?
From the Egit manual:
right-click Team > Show in History
That will display the graph of commits for that file.
That is the equivalent of git log

Eclipse: Git how to push after a local commit

I sometimes realize a local commit with Eclipse and then decide to push my project but Eclipse offers me only two solutions "Commit and Push" or "Commit".
The problem is I cannot make a "commit and push" if I haven't changed anything after my "Commit".
Fair enough, I only have to change a line on my code and can push it but it seems to me like an awkward solution. Is there a better way to do so?
You can always just open Eclipse's built-in terminal (or any other terminal app) and execute: git push.
On a side note: getting used to using git on the command line enables you to easily switch between different IDEs and editors without having to re-learn the respective quirks of the git integration of the IDE de jour every time you switch.
In the Package Explorer, Project Explorer, etc. right-click the project folder and choose Team > Push to Upstream.
Alternatively, you can use Quick Access (Ctrl+3) and enter push to upstream (assuming a file of a Git repository is selected or opened).
For a Git main menu and Git icons in the main toolbar, in Window > Perspective > Customize Perspective..., in the tab Action Set Availability check the checkbox Git.

Eclipse git commit started defaulting comment text to " Change-Id: I0000000000000000000000000000000000000000"?

Where is this coming from and where's the setting to turn it off?
Change-Id: I0000000000000000000000000000000000000000
It started showing up in Git commit ... Eclipse neon.3
UPDATE
Clicking the icon on the top-right of the commit window makes this go away, but then it comes back at the next commit.
Here are my settings
Change-Id is usually used in gerrit.
So you don't use gerrit, change-id is unnecessary.
When you commit your source code, This icon can turn off Change-id.
Finally solved in git command-line: git config --unset gerrit.createchangeid
Where did this setting come from originally and how did it get to my machine? No idea.

Can we Disable or Prevent "Commit-and-Push" in Eclipse EGit?

We migrated to Git a few months ago. To ease the transition, we adopted using the EGit plugin for Eclipse. The Git Staging view includes 2 buttons: "Commit" and "Commit and Push"
We trained the team in a Commit-Pull-Push workflow. But the "Commit and Push" button has become popular in practice. It causes some minor workflow issues and I am discouraging its use, but would love to disable or remove the option until we have a deeper team-wide understanding of Git.
Is this possible? Is there a setting, property or option to disable "Commit and Push"?
IMHO we can't make "Commit and Push" button disabled.
EGIT doesn't provide any preference option to disable this. If you want to remove/disable this button your have to edit the source code of EGIT eclipse plug in then build it for yourself.
Instead you try NOT to use GIT staging view for committing purpose but use commit dialog for committing.
Disable the preference Use Staging View to commit instead of Commit Dialog in Windows > Preferences > Git > Committing

Eclipse and EGit: How to easily review changes to ALL modified files before committing to *local* repository

I'm using Eclipse Indigo SR2 with the (built-in) EGit plugin v.1.3.0.201202151440-r and haven't been able to find any way to easily review all my changes before making a commit.
I used Eclipse with SVN for years, and this was always very easy to do. I would typically right-click on my project, select Team->Synchronize, double-click on the first changed file (in the Team Sync perspective), then hit Ctrl-. repeatedly to review all changes in one file, and then proceed to the next file, as I wrote a summary of my changes for the commit message.
But of course, git is very different from Subversion, and so my workflow must change. With EGit, "Team Sync" only appears to be useful for reviewing changes between my local files and the remote repository (i.e. before a push to the remote). I need a way to review changes since my last commit to my local repository. I generally don't even care to (re)review changes before a push to remote (and if I did, I'd prefer a simple equivalent of git log to see what commits I'm about to push).
If I right-click on my project and select Team->Commit, I am presented with a window that does almost everything I need to do (select files to stage, commit, write a commit message, amend a previous commit, etc.). What it doesn't allow me to do is quickly and easily review all my changes in a compare editor. I can't believe this capability doesn't exist! It seems I am required to double-click on each individual file, review the changes, close the compare editor, and double-click on the next file. That's ridiculous!
TL/DR - I am looking for a simple GUI equivalent (in Eclipse) to do what I am easily able to do from the command line using git vimdiff (where vimdiff is a git alias that uses vimdiff as the "difftool" to cycle through all modified files) followed by git commit (with perhaps a git add or two in between).
If no one has a good solution, I am curious about how others handle their commit workflow with EGit. I've been getting along fine committing from the command line (not that Eclipse is happy about that) but I can't believe that EGit is as near-useless as it seems to me. Perhaps my google-fu is not as strong as it once was?
Says here that you can see the diffs between the working tree and any given reference. Perhaps you should try out the latest version (Juno) of Eclipse/EGit and see if it's gotten any better?
Update: I've tried this out in the latest Eclipse, and as far as I can see it works fine. Here's how:
In the moment of writing this, Eclipse Juno 4.2 is the version you should go for. On the download page, you can pick between several packages according to your needs. The 'Eclipse IDE for Java Developers' comes bundled with EGit, but you can also install EGit into any distribution using the Eclipse Marketplace (under the Help menu).
Once you've imported your project into Eclipse, make sure the project is "shared":
Right-click project -> Team -> Share Project.. -> Git
Now do the following:
Switch to the Team Synchronizing Perspective.
Click the little synchronize button in the Synchronize View.
Choose Git
Pick a suitable branch to sync against, like refs/remotes/origin/master
Make sure to check the "Include local uncommitted changes in comparison" box
Click Finish
Now, change some files and watch them appear in the Synchronize View. Double-click the changed files to see the diff (like in the screenshot below).
Are you aware of the 'Git Staging' view. It keeps track of all the files that have changed and you can review the changes any time. (This can be a bit better than using the commit dialog)
An alternative is to commit all changes without reviewing, and then use the history view to compare two commits (Simply select the last top most commits, right click and select 'Compare with each other'). This way you do not have to keep double clicking individual files. If you need to change something you can always 'Amend' the last commit. (I usually follow this approach)
I am writing this as of Eclipse Oxygen, but it should apply to other versions as well.
Option 1 with team synchronizing view: right click the project > Compare with > Commit. You can choose your latest commit here, even if you haven't pushed it to repository.
Option 2 with diff view: If you want to see the "diff" version without committing, you can achieve this by right clicking your project > team > stashes > Stash Changes > check Include untracked files. This will save all of your changes to a stash. Then you will right click project > team > stashes > select stash you saved. You click the green arrow at the top right to re-apply all of your changes you stashed back to your code. In the same stash window, you will see a "Diff" tab at the bottom right. Clicking on the diff tab will show your changes in the red/green highlighted diff style. I wish there was a way to generate a diff view without stashing, but this is the only work-around I have found.