Visual Studio 2022: is it possible to do a git merge without auto commit? - merge

In VS 2019, using the "legacy" git experience, when I want to do a merge there is an option "commit changes after merging". I usually de-check it. I can't find this option in VS2022. Is there a way to restore it?
Thanks!

You can uncheck "Commit changes after merge by default" from Tools -> Options -> Source Control -> Git Global Settings

Related

Is it possible to git push --force in vscode?

From within Visual Studio Code, is it possible to do a git push --force <repo> <branch> in some way?
Since 1.35 (May 2019), provided that Settings > Extensions > Git > Allow Force Push is set, the force push option is also visible in the Git menu (three dots, more actions), sub-menu "Pull, Push".
You must first enable it in settings:
Note: You needed, with 1.35, to restart VSCode (or at least "Reload (VSCode) windows") in order to see that new option.
With more recent version of VSCode (1.65, 2022), no need to reload/restart.
See issue 62020, closed with PR 62021.
As noted by CletusW in the comments:
Note also by default this uses the safer --force-with-lease option, also configurable in Settings > Extensions > Git, toward the bottom
I detailed --force-with-lease in "git push --force-with-lease vs. --force".
It is now available after September 2018 v1.28 release.
Check the release notes for more information:
https://code.visualstudio.com/updates/v1_28#_push-force
EDIT: Thank #Kevin for the hint.
If you can't find the option, you can change the VSCode settings as follows:
I also faced same issue where I couldn't find the option to do force push in vscode 1.40
Here is a screenshot to find the option in the setting
Open Visual Studio Code
Go to File --> Open Folder and select your project folder
Select Ctrl+` to open the terminal window
Type git push --force <repo> <branch> in terminal window and hot enter

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

How to change merge mode for eclipse egit merge tool?

We are working with Git and Eclipse. If I'm opening the merge tool to resolve a conflict I get this dialog:
I want to change this afer I marked Don't ask again before. But just cannot find the correct preference page.
Where can I change this after the dialog does not show up anymore?
You can change this in Eclipse Git preferences. Go to Window -> Preferences -> Team -> Git and there is dropdown for Merge Merge tool content.

egit does not show label decorations

I am a git beginner.
I have created a git repository with 4 eclipse projects.
A while I was committing and pushing with the git command.
After that, I installed EGit for eclipse. In "Git repository exploring" perspective I added an "existing local repository" and I am able to commit and push changes from this perspective.
The problem is that, in any persective, eclipse does not decorate labels according to Window -> Preferences -> Team -> Git -> Label Decorations. Or more directly said - I cannot see uncommited changes in the project tree.
Any suggestions? Thanks!
OK I just saw the answer here:
Eclipse and EGit
I had to manually add each of the eclipse projects right click -> Team -> Share -> Git -> Finish.
Why do these answers appear when you have just asked? :-)

Tortoise equivalent 'replace with latest from repository"?

I have a PC for Windows development and Linux box for Android development. Our source control is Subversion and I use TortoiseSVN on Windows and Subclipse plug-in in Eclipse on Linux.
Sometimes I'll edit a file for some experiment but I don't want to keep the changes. In Subclipse all I have to to is "Replace with latest from Repository" to bring it back in line with the latest committed code.
What's the equivalent of this in TortoiseSVN? Is there a simple one-step way to replace my local file with the current latest in the repository?
N.B. I don't want to do an "Update" because according to the documentation that will merge in others' changes. I want a complete replacement.
Thanks in advance.
I don't think there's a one-step action for that.
Right-click on working copy folder TortoiseSVN -> Revert & choose the files which should have their local changes undone, and then do a TortoiseSVN -> Update.
Use svn revert or the same command of TortoiseSVN context menu: http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-revert.html and then svn update the working copy,
Ultimate solution: svn checkout a fresh working copy or do it though TortoiseSVN context menu.
Try Right Click the item > Tortoise SVN > Update to revision... > select Head Revision and you are done!!!