Is there a way to stage all changed files before a commit? - smartgit

Right now I'm manually selecting each changed file for staging before committing. I'm curious whether there's a SmartGit equivalent to
git commit -a
perhaps a shortcut to select all changed files (other than those being .gitignored).

When having selected the repository root directory in the Repositories view and having the focus in this view, operations like Stage and Commit will work on all available files, regardless of which files are currently visible in the Files view (e.g. you might have selected to hide untracked files).

You can select all changed files in the Files pane with standard OS shortcut. On Windows this is Ctrl+A. Then you can stage the selection as usual.
Note though that if you are going to commit only the whole files, you don't even need to stage them. After you selected files of interest, you can press Commit, and then make sure the "Local Changes" option is picked on the top of the dialog. SmartGit will stage and commit selected files for you automatically.

Related

Why is VSCode creating a history file?

VSCode keeps creating a history file even after I delete it. If I don't delete it, it accumulates to over 5000+ pending changes in my source control tab, and I don't know what I did with my settings for it to keep recreating the history folder. How can I delete this for good? I don't know if it affects my other files, and based on my history of deleting it, I don't think it does.
you can always add a .gitignore file and add the following line in it. This way your git engine won't pick them up.
.vscode
It just means you have a lot of vscode settings in your local, you can ignore them or delete them if you don't want to keep these editor settings. These settings won't affect any other files or other people's computer, as long as they don't get committed into the code repository.

How find deleted or removed file under clearcase

I need to modify a Simulink project stored under clearcase. From this project I must generate the C code, but this not the problem. The problem is that all generated files (*.c and other) are saved into clearcase and the code generation delete some file without overwrite the old version with new. Fortunately seems only for files different from *.C but in any case under clearcase (I use a windows client) I found in correspondence of deleted file:
the file name
three colored question marks
I think that clearcase has the information regarding the file stored but is not able to allocate this.
Now I need a command/script for CC which help me to found ALL removed files from the view because the project structure is very complex and a manually search is hard.
Thanks for any suggestion
"three colored question" marks means "checked out but removed", as in this example (you can recover from it by reloading the snapshot view)
If an automatic process is generating or deleting files in a snapshot view (it wouldn't be able to do the same in a dynamic view), then you should end up with a bunch of hijacked files (as identified in a snapshot view).
You could check them out and check them in.
For the files that need to be deleted, you can follow "What's the “proper” way to delete files from a ClearCase snapshot?".
But both process are manual and doesn't scale well.
There are two viable options:
1/ Don't version what is generated (you can re-generate it at any time)
2/ If you must version what is generated, then:
generate it outside of the snapshot view
use clearfsimport to import the result of that generation into the snapshot view: that will checkout the right files and will delete the files that are no longer generated.
That would be the right solution for "w I need a command/script for CC which help me to found ALL removed files"

How do I stop the remote client showing all folders even unloaded ones?

I am using Clearteam Explorer 8. I recently was browsing a project folder which contained a symbolic link. Explorer said that I would need to enable something in order to follow the link. I said ok.
Now it insists on showing me every possible folder in all of my views including unloaded ones. The folders have no contents, but it makes all views really hard to navigate as there is a lot of chaff in the view's tree.
I cannot find where this option is set/unset because I set it in response to a one-time prompt. Does anyone know how to turn this off and have it only show me loaded folders?
Check in the Load Rules tab of the "Edit Configuration" dialog box, for Web views only, if you have the option "Show Obsolete Directories and Files" selected.
Un-selecting this option might help.
If you can edit the config spec of your view, you can add cleaning rules, like:
element /avob/* -none
If you placed it just before the last one (element * /main/LATEST), that would hep ClearCase to not select at all any element which wasn't already selected before by the config spec selection rules.
I had the same problem and I solved it by:
Removing the parameter ccvtreeviewer.fetchFullTree=true from file com.ibm.rational.clearcase.prefs. On my machine, this file is located in folder: C:\Documents and Settings\UserName\.Rational\CTE8\workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings\com.ibm.rational.clearcase.prefs
Editing the file com.ibm.rational.team.client.ui.model.prefs and update theses parameters:
appliedTreeRules_0=com.ibm.rational.clearcase.ui.actions.ShowLoadedVobsAction|Public and Private VOBs|true|true|true|System;
nonappliedTreeRules_0=com.ibm.rational.clearcase.ui.actions.ShowUnloadedVobsAction|Unloaded VOBs|true|false|false|System;com.ibm.rational.clearcase.ui.actions.ShowUnloadedElementsAction|Unloaded Elements|true|false|false|System;com.ibm.rational.clearcase.ui.actions.ShowLoadedPrivateVobsAction|Private VOBs only|true|true|false|System;com.ibm.rational.clearcase.ui.actions.ShowLoadedPublicVobsAction|Public VOBs only|true|true|false|System;com.ibm.rational.clearcase.ui.actions.ShowUnmountedVobsAction|Unmounted VOBs|true|false|false|System;

ClearCase "locking" files -- How to refactor?

While at home for personal projects i use Mercurial, at work we're using ClearCase.
I am attempting to run a few horizontal (touching lots of source files) refactorings in Visual Studio for the code base, however, for since each file is locked by ClearCase, it has to be unlocked and prompts for the actual activity that the check out is for.
In Mercurial, there's no such concept as far as i'm aware of: files are not being locked at all at any point of time!
Is there a way of doing such a refactoring, or any other operation that acts on multiple files, without having to check out each and every one manually?
In a DVCS (distributed VCS like Git or Mercurial), you simply cannot "lock" a file, since all the other repos wouldn't be aware of such a "status".
But with ClearCase and its locking mechanism (optimist with "unreserved checkout" or pessimist with "reserved checkout"), you need to make a checkout to tell ClearCase you will modify some files.
However, you could also, for large refactoring:
make and update a snapshot view
set all the files as writable (through an OS-based command, not through ClearCase "checkout")
perform your changes
search for all hijacked files and checkout/checkin those files then

svn / subversion: Get ALL files on new check out, but then exclude certain files from update/check in

After a fresh checkout, I want to get ALL files,
specifically this file: etc/config.ini
However, once I modify etc/config.ini, I do not want it committed with "svn commit ..." nor should it be reverted on a "svn up".
This would allow you to get default values on an initial checkout (convention over configuration), but then after configuring, you don't want these "local" configuration files committed into svn.
The best way to do this is not to directly version control the file.
A common way to avoid this issue is to have config.ini.sample (or something along those lines) under version control, and then config.ini ignored in your svn:ignore property.
Then, after checking out, copy config.ini.sample to config.ini and you're good to go. This way you can also version control your template config file.
If you use TortoiseSVN and/or VisualSVN (>= 1.5), you can move these files to the changelist 'ignore-on-commit'. This causes the files to show up in a separate section in the commit dialog, and never automatically selected for committing.
Obviously this is a TortoiseSVN-specific solution.
Jason already hit on the general accepted solution (the one promoted by the SVN folks themselves), but there is another option, if you're using TortoiseSVN as the client. When you're at the commit dialog, right-click the file you don't want to ever commit and choose Add To Changelist->Ignore On Commit. It will still show up in the commit dialog every time you go to commit it, but it defaults to unchecked so it won't actually be committed unless you explicitly check the box. Again, only useful for Tortoise, so if you use the same WC with a non-Tortoise client, you'll accidentally commit it.

Resources