It's all about the answers!

Ask a question

Jazz SCM equivalent operations to GIT


Adrian Daniels (6312120) | asked Feb 05 '14, 5:30 p.m.
Hi,
I am working with a team that currently use GIT and a 3.x version of RTC, not integrated. In the past they have tried Jazz SCM but could but get all the functionality they wanted and started using GIT.
There is an opportunity for them to move to a 4.x CLM setup and they have been asking about some Jazz SCM operations equivalent to these GIT ones:
git bisect   
    - to find when a bug/functionality is introduced 
    - I believe we already decided there isn't an analogy
git reset 
    - 1) i've made several commits(changesets) on my local branch. now I want to create a branch at this point (to keep my work for later) and reset my local branch to match the remote branch to get some other work done (collaborate with a teammate) 
        (on branch: featureA) 
        git checkout -b new_featureA 
        git reset --hard origin/featureA 
    - 2) i've completed merging two branches, and committed the merge. now i realize that the merge was not correct, so I want to re-do it and get it right 
        (on branch: master) 
        git merge featureA 
        (resolve conflicts, commit changes, realize that I messed up) 
        git reset --hard HEAD~1 
        (start merge again) 
create a new branch from any existing commit 
  - I want to branch off of an existing commit, which isn't a commit at the head of a branch, and there isn't a tag pointing to it either 
    git checkout af89a08e0 
    git checkout -b featureB 
create shell scripts to interact with SCM 
  - I want to run a script which fixes certain common merge conflicts then stages changed files for committing 
  - git commands used: 
        git status: lists each file and shows which files have unmerged conflicts 
        git add: stage files in the index so they are ready to be committed 
rebase/squash commits - git rebase 
  - often i create multiple small temporary commits locally which I later squash into a single commit before pushing remotely 
git pickaxe - git log -SsearchString 
  - find commits in the log where "searchString" was added or removed 
show branch activity 
  - show all branches, who was the last person to commit, and when the commit was 
  - git for-each-ref --sort=-committerdate refs/heads/ --format='%(refname:short) %(committerdate:short) %(authorname)' 


I am going to dig deeper into this tomorrow, but I just wanted to get this out there in case others have already looked into one or more of these.
Cheers
Adrian

Comments
Henning Sternkicker commented Feb 06 '14, 9:47 a.m.
JAZZ DEVELOPER

For the git reset functionality:
for case 1) I think the nearest would be the "Suspend" of a change set (Like Lauren already said.)
for case 2) you should have a look into the "Reverse" Action on a change set. If you have a change set delivered to a stream, you can search for it, e.g. by user or date, and then you can select the change set, right click on it and you will find a "Reverse" action, which will create a "negative" change set as a patch to undo the changes in the change set.

3 answers



permanent link
Lauren Hayward Schaefer (3.3k11727) | answered Feb 06 '14, 8:54 a.m.
JAZZ DEVELOPER
Hi Adrian,

You might find this post helpful:
http://www.aaroncohen.me/2013/07/git-versus-subversion-versus-rational-team-concert-basic-commandline-syntax-reference/

I don't have a lot of first hand experience with git so it's hard for me to make direct comparisons.  One piece you may be interested in is the option to Suspend changes.  Suspend pulls changes out of your repository workspace until you resume them.  This allows you to pull out in-progress changes, work on something else, and then resume working on those in-progress changes.

permanent link
Ross Anderson (61) | answered Apr 06 '15, 1:39 p.m.
JAZZ DEVELOPER
edited Apr 06 '15, 1:40 p.m.
A partial answer: I recently discovered how to do the equivalent of git rebase ("squashing commits") with Jazz SCM in Eclipse:

(1) in Pending Changes, select all the changesets
(2) right-click, New -> Patch
(3) save the Patch as mypatch.patch
(4) select all the changesets, Suspend them all
(5) Project -> Apply Patch, select mypatch.patch
(6) in Pending Changes, right-click the Patch, click Auto-Resolve
(7) Now the changes are in Unresolved. Create a new changeset like normal

permanent link
Steven Holtsberg (29665) | answered May 27 '20, 2:08 p.m.

A feature was added for release 6.0.6.1 that allows a user to combine two or more change sets into a single change set. This is similar to the squash feature of GIT.

In the Eclipse client:
https://www.ibm.com/support/knowledgecenter/SSYMRC_7.0.0/com.ibm.team.concert.dotnet.doc/topics/t_combining_change_sets.html

In the Visual Studio client:
https://www.ibm.com/support/knowledgecenter/SSYMRC_7.0.0/com.ibm.team.concert.dotnet.doc/topics/t_combining_change_sets.html

In the Command Line Interface:
https://www.ibm.com/support/knowledgecenter/SSYMRC_7.0.0/com.ibm.team.scm.doc/topics/combine_changesets.html

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.