Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a git style amend option in TFVC?

Tags:

git

commit

tfs

tfvc

In git there is a very handy feature that lets you fix your last commit, e.g. when you have forgotten something that does not justify a full commit.

It is very easy to do this in git:

git commit --amend

That way you don't have to specify a commit message or anything else, the commit is simply "appended" to your last full commit - or at least that is how I understand it.

Is there anything similar available in TFVC?

like image 615
ovm Avatar asked Jun 12 '14 11:06

ovm


People also ask

How do I modify changes in git?

Use git commit --amend to change your latest log message. Use git commit --amend to make modifications to the most recent commit. Use git rebase to combine commits and modify history of a branch.

How do you amend changes to a commit?

use git commit --amend to make changes, or. use git reset @~ to discard the last commit, but not the changes to the files (i.e. take you to the point you were at when you'd edited the files, but hadn't committed yet).

How do I amend a git command?

You can use the git commit –amend command to edit a commit message. To do so, use the -m flag and specify a new commit message in quotation marks. This command will replace the single commit log message in your last commit with the one that you state.

Is git amend safe?

git commit --amend (correctly spelled) is actually more dangerous than git commit -a -m "mend" . The former will rewrite an existing commit, replacing it by a new commit, so this is more or less a destructive command. The latter however will just create a commit that you didn't intend to do.


1 Answers

No, not really. You can update the Check-in comment, or associate a work item, but you cannot change the file contents of the check-in. A rollback doesn't help either, since that will add yet an additional compensating checkin to the history, making it even harder to understand.

To update the message, open the TFVC history panel and right click a changeset. Choose Show Changeset Details and you'll be able to update the Check-in comment and optionally the check-in notes.

To associate to a new work item make note of the changeset number, open the work item and go to the links tab. Click add-link and chose the link type "Changeset", supply the number and save the work item.

like image 53
jessehouwing Avatar answered Sep 23 '22 11:09

jessehouwing