How can you show the standard TortoiseGit log window for a repository or specified file in repository from the command line?
If you're currently in a working copy directory, you can run this command:
TortoiseGitProc /command:log /path:.
Or to just show the log of a specific file, use:
TortoiseGitProc /command:log /path:MyFile.txt
I haven't yet worked out how to specify a certain branch/remote, however.
Assume C:\Program Files\TortoiseGit\bin is in %PATH%
Since 1.8.0
TortoiseGitProc.exe /command:log
will show log of repository in current directory.
TortoiseGitProc.exe /command:log /path:C:\Repo1\MyFile1.txt
TortoiseGitProc.exe /command:log /path:MyFile1.txt
will show the change log of MyFile1.txt
Note that MyFile1.txt part is case sensitive, C:\Repo1\ part is not case sensitive.
Note: 1.7.15 and older use TortoiseProc.exe
Related
I have been using the gvim command :w to save and it works fine saving it to the desktop. However with the vim program, when I use the command :w, I cannot find where the saved file is located.
It should save to whatever directory you started writing it in (you can see that in the command line). You can also use your computer's file search to locate it and then inspect for the file path.
As said by others: by default it saves in the directory where you started it. But if you aren't aware in which directory you started, then a way to find out is to use the :pwdcom in vim. This will output the current directory. That's where vim will store the file.
C:\Users\"windows user"\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\LocalState\rootfs\home\"WSL user"
Adding another answer to get the filename as well.
As mentioned by Cary and Jeen, vim saves your file to the directory from where it is started. You can get the directory where it is saved using :pwd.
If you are interested to get name of the file, it can be done by ctrl + g when your laststatus=1, which is the default value.
I usually set laststatus=2 which always show the filename.
So I just moved from Ubuntu to Windows (read forced to move, thanks to compatibility issues) and am using Git Bash to pull in my files. I've noticed something extremely strange.
Git Bash is installed in C:\Program Files (x86)\Git\, and when I first run the Git Bash program, the default location is this. Normal right? Right.
But here's the weird part..
When I run the command mkdir srv in the Git Bash command line, I can see it in the Bash window - but I can't see it in Windows Explorer?! What the heck. Same thing happens with files created using vi in the CLI. Invisible in Windows Explorer. (Yes, I have enabled the Show hidden files option in Explorer, so it's not that).
Here are some snapshots (no, I'm not blind - nor am I insane). Help?
You might not be able to see the folder because of missing privileges. Try running your explorer as Administrator and look again.
The proposed solutions above didn't help me. However, I copied the hidden directories to another place via git bash. Then I copied them once again via windows explorer to the original place. Now they've become visible. I created those invisible folders via git bash with git clone command before.
I had similar issue, but with file attributes, not with missing privileges.
In cmd under C:\Program Files (x86)\Git\ run command attrib
attrib *
You will know if srv folder has System or Hidden file attribute.
If you would like to view it in cmd then use dir /a:s
I am quite new to the Mac Terminal environment.
I donwloaded sqlplus (which is recognised as a UNIX executable program) and then in Terminal I do cd a few times until I arrive in the folder I put this in (\Applications\instantclient_10) in this case.
When I type 'ls' I see a listing of all the files including the sqlplus. So I would then expect to simply type at the Telnet prompt 'sqlplus' and then this would start but instead keep getting
-bash: sqlplus: command not found
This is problem one.
I have now downloaded MySQL and again, when I go to the correct folder (\Library\StarupItems\MySQLCOM) and I type 'ls' I see my files (including MySQLCOM) but when I come to try to 'run' this by simply typing 'MySQLCOM' again the message is:
-base: MySQLCOM: command not found
What am I doing wrong?
Thanks
To run binary/executables in current folder you need to prefix them with ./
./sqlplus
The idea here is that you want to force execution of local file and not run it accidentally. Imagine app that would put ls binary into it's folder and it would automatically run if did ls in that folder.
When I get to the step:
touch README
I get the error
'touch' is not recognized as an internal or external command, operable program or batch file.
What does this mean?
I'm in Win 7 Home Premium command prompt.
Make sure you're working in git bash, not cmd.
The touch command updates the last-modified timestamp of the file to the current time, or if the file doesn't already exist, creates an empty file with the given name. This command does not exist (by default) in Windows, which is the reason you get that error message.
To get past this step, you can create a file called README in whatever way you feel most comfortable with. For example, you could use notepad.exe if you have no better alternative available.
Use this code in CMD and then touch your file
npm install touch-cli -g
Windows fails to pick up my .hgignore file. I'm running Mercurial from the command line, and "hg status" shows lots of files in the ignored directories.
The .hgignore file looks like this (there's no whitespace at the start of the file, or at the start of each line). I've put it in the root directory of the repository.
\.pyc$
\.pyo$
\.DS_Store
\.Python
\.installed.cfg
^bin$
^build$
^develop-eggs$
^eggs$
^include$
^lib$
^parts$
^pip-log.txt$
^web/localsettings.py$
I've tried saving the file in ANSI and UTF-8, and it doesn't seem to make a difference.
I know the file is working OK on Linux, is there anything different about the paths in Windows?
If the .hgignore file is in your user profile directory (%userprofile%/.hgignore), then edit your mercurial.ini (which should also be in your user profile folder) to have this:
[ui]
ignore = %USERPROFILE%/.hgignore
That will cause hg to recognize and use your .hgignore file. The .hgignore file in your user profile directory will affect hg's behavior for all repositories. If you want to have specific per-repository settings, you should be able to put .hgignore files in the root of each repository.
Also, be aware of this: Even if Mercurial is picking up your new .hginore file, it won't necessarily ignore all the specified files! Any file that had previously been added to the repository will NOT be ignored until you explicitly remove it from the repository.
First, the .hgignore file must be in the root of your repository
Then, you must specify the used syntax at the first line of your .hgignore file (in your case, regexp):
syntax: regexp
"hg status" shows lots of files in the ignored directories
Are you referring to .DS_Store and .Python exclusively? The rule for ^bin$ will only ignore entries with that exact string. It will not, for example, ignore "bin/a.out".
The only other thing I could think of is if there is some global setting that sets the syntax to glob (as opposed to the default of regex) hiding somewhere. I'm not aware of any such thing, and it certainly isn't on by default if installing an official binary version of Mercurial.