TortoiseGit amend merge commit: "show diff to last commit" checkbox is disabled - git-commit

I'm trying to commit --amend to a merge commit with TortoiseGit 2.13.0.1.
For a repository where the last commit is a merge commit, the "show diff to last commit" checkbox is disabled (greyed) and checked after i check the amend checkbox; it doesn't let me uncheck it:
With other repositories, the checkbox isn't disabled and not checked automatically after i check the amend checkbox.
Is this per design or is there some hidden setting to enable the checkbox for this situation?

Seems like this is per design in TortoiseGit and there's no way to enable the checkbox with builtin functionality. I don't know if it always have been this way; i couldn't find much "amend" mentioned in the docs or the releasenotes.
There are two options i can see:
use another tool which doesn't have this restriction
use zDump to enable the checkbox at runtime

Related

TFS: Link commit to work item stop working (entire collection)

I've been using the automatic links between commits and WI in TFS by writing #id in the commit message.
However, it stopped working for the entire collection, not only for a single project.
All the projects have checked the "Automatically create links for work items mentioned in a commit comment."
I´m really lost and I don´t know how to fix it.
Thank you very much for your ideas and support.
You need to check if the work item exists and you have the permission to view this work item (you can see it on your project portal) when you tried to link it to a commit.
When you make a commit on your local repo. You need to push your commit to the tfs server.
This option Automatically create links for work items mentioned in a commit comment. is set on repository level. You can check if the this option is checked for the repositories.
If above are all good, you can try unchecking the option Automatically create links for work items mentioned in a commit comment and save, then check this option and save again.

Discard unwanted change set

I am looking for a way to discard some unwanted change sets using TFS. I have looked into this site and many other and know that we need to use
tf merge /version:C137~C137 branch1 branch2 /recursive
However, I store all my source code in TFS DEV environment, I normally check out the code from DEV to my machine, work on it then check it back in DEV, roll back, fix it then check it back in. This process create many different change sets that hang around and needed to be cleaned up. So when I use TF merge command which branch I have to specify DEV and ????.
Thanks for your help
The merge command applies changes from one branch into another. /discard option means does not perform the merge operation, but updates the merge history to track that the merge occurred. This discards a changeset from being used for a particular merge.
But according to your description, you don't use branches or merge. What you want is delete/destroy changesets. Unfortunately, you can't delete changesets in TFS by default, if you delete changesets, the version control may be defeated.
You can always work with the latest version, when you want to work on a specific version, you can use TF rollback command. This command does not remove the changesets from an item's version history. Instead, this command creates in your workspace a set of pending changes that negate the effects of the changesets that you specify.

"Update" button disabled in GitHub Desktop

I'm using GitHub Desktop for code management. I've created a branch for some code changes to my project, I've committed those changes, and now I want to merge the branch back to the master branch. The GitHub instructions for doing this indicate I need to click the "Update to master" button to perform the merge. Unfortunately, that button is disabled in my case. If I hover over the "Update to master" button the tooltip states " is up to date with master". Yet if I switch back to the master branch it is clear my code changes are not yet in the master branch.
Does anyone know what I might be doing wrong? How can I convince GitHub Desktop that my code changes do indeed need to be merged to the master branch?
I learned the answer: You can merge a feature branch back the master branch by switching to the master branch and then click the Compare button and select the feature branch from the pop-up menu. Now the Update button will merge the feature branch to the master.

TFS Override the latest change

I have a file that was checked in and is part of a C# project. However, this file is incorrect and it overwrote the previous change which was correct. I need the latest change of this file to revert back to the previous changeset, and I need the previous changeset to be the latest change.
How do I do that?
You can roll back to the previous changeset. This option is only available from the commandline.
tf rollback /toversion:VersionSpec ItemSpec [/recursive] [/lock:none|checkin|checkout] [/version:versionspec] [/keepmergehistory] [/login:username,[password]] [/noprompt]
Alternatively, use Get Specific Version (check all the boxes to override the files) to get the version of the file you want, check the file out and check it back in again. When prompted to resolve merge conflicts, select use local version. This will create a new version on top of the incorrectly checked-in one.
If you install the TFS Power Tool, you can roll back the changeset. With the Power Tool installed, you can do this in the GUI. Select the changeset in a history list, and right click and select Rollback entire changeset.
Here's a nice article:
http://www.edsquared.com/2010/02/02/Rollback+Or+Undo+A+Changeset+In+TFS+2010+Version+Control.aspx
From this article:
You find the TFS Power Tool here: http://visualstudiogallery.msdn.microsoft.com/c255a1e4-04ba-4f68-8f4e-cd473d6b971f

Using the edit - merge - commit workflow in TFS Source Control

Ive been using sourcegear vault and subversion/visual svn for quite a while now and am a big fan of the CVS disconnected style "Edit -> Merge -> Commit" way of using source control.
Since we moved to TFS 2010 i have been reintroduced to the horrid "checkout -> edit -> checkin" sourcesafe style way of working. Meaning only one user can work on a file at any time.
I cant find anything that suggests this can be changed.
Is it possible?
Checkouts in TFS aren't generally exclusive. By default, multiple users can checkout a single file. Exceptions are binary file types like JPGs, PNGs, etc. which are checked out exclusively by default.
Once you're ready to commit your changes, you can use the Pending Changes tool window to check for conflicts and merge if necessary.

Resources