sonofusion82
sonofusion82

Reputation: 200

Managing temporary changes in git vs clearcase

We are thinking of moving from clearcase to git. However , my organization have a habit of using clearcase config spec as a place to track temporary code changes.

Example for example the config spec for v1.1 would be:

# temporary workaround patch to be removed later!
element file1.c /main/temporarybranch/1

# main project label
element * v1.0

Due to the atomic commit of git and we need to share the temporary patch with the rest of the team, we will need to push that temporary patch to the main repository too.

What is the typical workflow to track these temporary patch so that they can be removed later?

Upvotes: 1

Views: 65

Answers (1)

VonC
VonC

Reputation: 1324577

You would simply make a branch, that you can push to the main repo, and that you can remove later.

git checkout -b temp v1.0

That branch would allow you to isolate any file you want, starting from the v1.0 tag (which in Git replaces ClearCase label or UCM abaseline)
So it isn't "file-specific", but it allows you to manage changes for any number of files.


This differ with the other approach in Git, where you want to ignore local modifications to a file:

git update-index --skip-worktree -- yourFile

See "Git - Difference Between 'assume-unchanged' and 'skip-worktree'".
That would be a local way to have a temporary change, but you wouldn't be able to share that temporary change with anyone else.

Upvotes: 4

Related Questions