4

Is there a way to select only certain changes in a file and add them to check-in? Basically I am looking for something like git hunk staging.

Rok
  • 705
  • 8
  • 20

1 Answers1

1

Rok,

Plastic SCM supports 'stashing'/'shelving' changes and it implements a mix of what Git and Perforce/TFS can do as you can find here: http://codicesoftware.blogspot.com/2012/02/shelving-stashing-introduced.html

Plastic SCM can:

  • Apply the stashes through merging - like Git and unlike TFS
  • Store the stash on server - like TFS and unlike Git

But, I think you're asking for a way to checkin only part of a file (hunks like in Git) which is something Plastic SCM can't do so far... An interesting feature but not yet there :P

pablo
  • 6,392
  • 4
  • 42
  • 62
  • Hi Pablo! Yes I am looking more in the direction of git hunk staging, but since I mostly used git via gitextensions UI I didn't know the term. Are there any plans to add the feature in the future? – Rok Feb 04 '14 at 09:12
  • Yes, we have it in the roadmap but I don't think we'll be able to work on it soon. Do you find very useful being able to commit only part of the file? – pablo Feb 04 '14 at 14:26
  • From my experience in git, I would say yes. It allows me to make smaller commits that are grouped by change that are somehow linked together. I tend to forget to commit immediately after making a small change, especially when I refactor code, and it is annoying if I have to make a larger commit then necessary or revert changes to do change grouping. I hope the answer makes sense. :) – Rok Feb 04 '14 at 14:42
  • It does Rok, thank you! :-) We'll see what we can do. – pablo Feb 05 '14 at 08:35
  • Pablo any news on this feature? I have exactly the same use case as @Rok. I've forgot to commit some changes and now I have bunch of changes from different features, would like to commit them separately.. – Wodzu Nov 01 '18 at 14:12
  • Would this not work...? 1) stash file 2) apply to retrieve all changes 3) revert changes you don't want 4) commit 5) apply stash again (to get the changes you didn't commit back) – Rupe Dec 09 '21 at 15:23