I'm trying to to create a batch file that will show TortoiseGit Sync Dialogue (the right click "Git sync..." shell option) for particular repository and I can't find how.
I know how to call TortoiseProc for log commit etc. but there is nothing for Sync Dialogue.
Do you guys know a way?
"C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe" /command:sync
Related
I am really devastated because I have accidentally deleted 3 of my files in Visual Studio Code. I did it through the Source Code Management menu on the left side. Now my question... Is there any possibility to restore the 3 files I deleted like this? I would appreciate any answer and maybe you want to know: I use Windows
:-(
I tried to look into the recycle bin of windows but it isn't there. :-(
vscode maintains a file-history using its latest TIMELINE view.
How to restore deleted git-untracked files in vscode:
Create the files with the same name at the same directory.
Go to TIMELINE on the File Explorer.
You can get the older versions of the files.
No, you cannot recover those files using VS Code or standard tools. They aren't put in the recycling bin (or your operating system's equivalent), they are removed using git cleanor git reset --hard. Condolences :-(
There are of course utilities for recovering deleted files that may or may not be successful, but that is outside the scope of this question.
I accidentally removed a file that wasn't even checked in to git. Google brought me here. The file wasn't in the Trash can either (Ubuntu 18.4 VS Code 1.31.1). Looking at the git output I can see that it used git clean -f to remove it by force).
Fortunately the file was still in the editor. Just press Ctrl+P and type the file name. It should show up in the list of files and if you open it, it says "FILE_NAME (deleted from disk)" on the tab. Just copy/paste the content to where it should be.
if you accidently click the delete menu option right below rename, as long as you don't panic and like restart your computer or something you can open that directory in the file explorer on your computer
and right click.
there should be options there to undo delete or whatever else you did to the directory.
Open VSCode's command menu, and type "Local History" and select "Local History: Find Entry to Restore." Then type the name of the file you deleted.
This has worked for me when "undo" in the file tree has not.
Super easy, and has saved me from despair.
I have checked out a copy of a SVN project, I have modified some files and want to commit the changes. If I go to File > Source Control > Commit. I see an empty list and a button saying "Commit X files". I expected a list of the modified files.
Now, I use the command line tool (svn ...). But I want to bring back the Xcode commit window.
How may I fix it?
BTW. I'm using Xcode 4.6.1
That is a very very strange screen shot. Sometimes Xcode's svn integration can be a bit strange. If I were you I would just cancel out of the strange empty dialog and use svn at the command-line in Terminal instead.
In file > preferences there is a source control section. You probably have the check box checked to update the source control automatically. So, because it is already updating the source control, it doesn't let you do it.
So you can uncheck that box to make it not automatic, then change something in your project and try to commit the changes. You will probably see some files now.
I'm just beginning to use TortoiseGit for Windows (I'm new to git) and I don't see the Add command in the context menu when I right-click on a directory or file. As I understand it, I should run this addcommand each time I want an update to a local file to be "staged". Here I don't see such a thing, the only "similar" thing I can do is run a commit instead, which is obviously not the right thing to do.
Besides, when I create a new file I also want to add it, but the context menu only proposes to "Add to ignore list".
Am I missing something here?
You can add a file or folder to a git repository by right-clicking on it, then in "TortoiseGit"-submenu select "Add.." (should be the first menuitem, right above the "Add to ignore list"-submenu).
Anyway... another way of staging files or folders via TortoiseGit is to right-click the repository > TortoiseGit > Check for modifications > select the filed/folders you wish to stage from the list of not versioned files > right-click > add.
I have just started using GIT and for some reason every single time I click to open GIT GUI I can't see the repo picker, it just goes to the repository screen and shows it's in C drive.
Does anyone know how to over ride this so I can pick my repo every time it opens like normally?
Thanks
If you are talking about the git gui command, it opens a repository determined by your current working directory. If you are outside a GIT_WORK_TREE, then you will see a dialog that allows you to select a repository.
If you're using some other tool, you will need to update your question to get a better answer.
I have been looking for a recursive checkout/checkin script, and everything that I have seen has been for base ClearCase only. Is there a reason for this? Does anyone have a script that can be used for ClearCase UCM?
I also don't personally see a reason that someone would have to checkout a bunch of files at once. Are there any major pitfalls to giving someone the ability to do this?
Added:
I found this, but I am unsure if this is the best way. It seems that it has your commands. I would like them to have the ability to do this with the GUI, since they aren't too familiar with the command line.
http://www.ibm.com/developerworks/rational/library/4687.html
Script to recursively Check Out and Check In
Note: For the following procedures, you need to have local
administration rights to be able to customize a ClearCase menu.
Checkout For the check out recursively option, do the following:
Start the clearmenuadmin.exe utility (to do this, click Start > Run, and
type clearmenuadmin.exe) In the Object type tab, select the directory
object. Choose checked-in as the Object state Click the new button in
the Available menu Choices pane, and then enter the following
information in the appropriate fields:
Menu Text: Checkout (recursively)...
Help Text: Check out the selected item recursively...
Command Type: Executable/Regentry
Command: Software\Atria\ClearCase\CurrentVersion\ContextMenus\CmdLineExe
Initial Directory:
Arguments: /c cleartool find $file -exec "cmd /c
cleartool checkout -nc \"%CLEARCASE_PN%\"" Comment:
When this is done, you can add this new menu entry to the This menu
contents pane by pressing the Add button. Position it as desired with
the Move up button. After completing this customization, choose
Configuration>Apply to apply the changes. Then you can test it in
Windows Explorer.
Checkin
For the check in recursively option, do the following: Start the
clearmenuadmin.exe utility In the Object type tab, select the
directory object. Choose checked-in as the Object state Click the new
button in the Available menu Choices pane, and then enter the
following information in the appropriate fields:
Menu Text: Checkin (recursively)...
Help Text: Check in the selected item recursively...
Command Type: Executable/Regentry
Command: Software\Atria\ClearCase\CurrentVersion\ContextMenus\CmdLineExe
Initial Directory:
Arguments: /c cleartool find $file -exec "cmd /c
cleartool checkin -nc -identical \"%CLEARCASE_PN%\"" Comment:
When this is done, you can add this new menu entry to the menu
contents pane, position it as desired, and apply the changes as
described in the previous procedure, and then test it in Windows
Explorer.Command:
Is this the best way to do it? (I understand the Arguements, but the Command is throwing me. (Is this the .exe on the local machine or server?) Can this be available to anyone or would I have to set this up on each machine that people are using?)
Any UCM recursive checkout would be identical to a base ClearCase one (like in "How do I perform a recursive checkout using ClearCase?").
The only difference would be the need to check for a current set activity, or to create/set one UCM activity before making any checkout.
Now, UCM or not, checkout many files without knowing if they will be modified or not is not a very good idea, because you have no easy way to detect said unmodified files when it comes to check-in all the checked out files.
(That is why a recursive checkin will have to include two steps: see "Recursive checkin using Clearcase")