Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

How to restore working directory from GIT

Options
dgoedh
dgoedh Posts: 63

Hi, how are y'all doing?

I have a question: while usiing Parsoft 9.10.6 for a workspace having a project containing the master test suite modules and a "runnable" project containing references to the test suites, all very basic still. I use GIT as source management/version control. My working directory (where I initially start building and commit changes) is on a V-drive, the local repository is on C:/users from which I push to the remote on a server.

For some reason the working directory on the V-drive got cleaned out. In Test Case Explorer view, the folders with my test suites/references were missing and in Navigator tab as well initially.
Later the missing folders in Navigator got back, however still empty, but now in the shape of a light blue house. Clicking on these, the content has been retrieved in the background from the local repo, I suspect. Thus now basically my working directory has been replaced with my local repo and the folders on the V-drive of my working directory, still remain empty.

Is there a way in SOAtest/GIT to restore/synch my working directory on V?
Any idea why these working directory folders get cleaned out from time to time?

Thanks in advance.

Stay safe.

Cheers,
Daniel

Tagged:

Comments

  • benken_parasoft
    benken_parasoft Posts: 1,230 ✭✭✭
    edited December 2020
    Options

    My working directory (where I initially start building and commit changes) is on a V-drive, the local repository is on C:/users from which I push to the remote on a server.

    In git, the "working directory" and "local repository" are typically the same folder. When you run "git clone" it checks out the master branch to the same directory as where the remote repository was cloned. There is a git-new-workdir utility script for Linux that can let you create working directories in folders different from the directory containing the local repository. For Windows, I used git-new-workdir-win once before.

    Is there a way in SOAtest/GIT to restore/synch my working directory on V?

    In a git working directory you can run "git reset --hard" to revert local changes, for example. However, it has to be a real git working directory (with .git folder).

  • dgoedh
    dgoedh Posts: 63
    Options

    HI, thanks for the explanation. I am beginning to get more comfortable with GIT step by step.

    Regards,

    Daniel

  • BastiaantB
    BastiaantB Posts: 8
    Options

    How can one revert changes on a .bak file (it seems to be a feature to have those :blush: )
    The hard reset did not work on the .bak file

  • jakubiak
    jakubiak Posts: 798 admin
    Options

    The .bak files appear because the option "Automatically backup project files" is selected on the Misc preferences page. If you unselect that option, the .bak files will no longer be created.

    Once you have the .bak files in the workspace, you can simply delete them.