git-for-windows

Wincred not working properly with Git Bash(Git for Windows) when executing certain commands like “prune”

不想你离开。 提交于 2019-12-09 23:45:41
问题 I have setup GitforWindows in my Windows 7 64Bit pretty well with Credential manager as "Wincred". Yet when I run some commands like git remote prune origin in GitBash, it gives following error in console, though runs the command: Failed to load advapi32.dll Why is that ? If there is something need to be done with Credential manager settings, then I need full explanation of how to do those settings and what each setting means. Note: This problem I have only with some commands, other commands

是否有快速的Git命令来查看文件的旧版本?

我的梦境 提交于 2019-12-08 14:17:25
Git中是否有命令可以查看(转储到stdout或 $PAGER 或 $EDITOR )特定文件的特定版本? #1楼 如果您喜欢GUI,则可以使用gitk: 用以下命令启动gitk: gitk /path/to/file 在屏幕顶部选择修订版本,例如按描述或日期。 默认情况下,屏幕的下部显示该版本的差异(对应于“补丁”单选按钮)。 要查看所选版本的文件: 单击“树”单选按钮。 这将显示该修订版中文件树的根。 深入到您的文件。 #2楼 按日期执行如下操作: git show HEAD@{2013-02-25}:./fileInCurrentDirectory.txt 请注意, HEAD@{2013-02-25} 表示此存储库中的“ HEAD位于2013-02-25上”(使用 reflog ),而不是“此历史记录中2013-02-25之前的最后一次提交”。 #3楼 除了 Jim Hunziker 的回答, 您可以将修订版中的文件导出为 git show HEAD@{2013-02-25}:./fileInCurrentDirectory.txt > old_fileInCurrentDirectory.txt 希望这可以帮助 :) #4楼 您可以将 git show 与来自存储库根目录的路径一起使用( ./ 或 ../ 用于相对路径): $ git show REVISION:path

Windows cmd git bash: conda.sh no such file or directory (Windows line endings, missing slashes)

狂风中的少年 提交于 2019-12-08 05:30:00
问题 I'm working in Windows 10 with a fresh installation of Anaconda and Git Bash. I decided to set cmd.exe as my default console program to use git bash (instead of the minTTY), and I think already I am getting issues with Unix style characters vs Windows. When I fire up cmd Bash tells me it can't find my conda.sh file: bash: C:UsersjoshuAnaconda3/etc/profile.d/conda.sh: No such file or directory First, it looks like bash is missing the default windows slashes for my root directory ("C:/Users

Multiple Github Accounts With Git In Windows

我的未来我决定 提交于 2019-12-07 20:32:17
问题 I recently ran into an issue where I could not push changes into a repository I had cloned down as another user from the first user I pushed with in git on my desktop. Basically it went like this, Use git for the first time which asks for github credentials when pushing to a repository. These credentials are then used for all pushes regardless of how the repo was cloned (which ssh key, user, etc) Generate SSH keys for both github accounts and add entries to the ssh config to target these

Multiple Github Accounts With Git In Windows

梦想的初衷 提交于 2019-12-06 05:00:45
I recently ran into an issue where I could not push changes into a repository I had cloned down as another user from the first user I pushed with in git on my desktop. Basically it went like this, Use git for the first time which asks for github credentials when pushing to a repository. These credentials are then used for all pushes regardless of how the repo was cloned (which ssh key, user, etc) Generate SSH keys for both github accounts and add entries to the ssh config to target these identity files. Keys are added to each github account as well. Clone repo using corresponding Host entry in

Wincred not working properly with Git Bash(Git for Windows) when executing certain commands like “prune”

别来无恙 提交于 2019-12-04 20:20:40
I have setup GitforWindows in my Windows 7 64Bit pretty well with Credential manager as "Wincred". Yet when I run some commands like git remote prune origin in GitBash, it gives following error in console, though runs the command: Failed to load advapi32.dll Why is that ? If there is something need to be done with Credential manager settings, then I need full explanation of how to do those settings and what each setting means. Note: This problem I have only with some commands, other commands are running just fine without any errors. If you are using the latest Git for Windows , make sure to

git blame on windows reports “fatal: no such path <path> in HEAD”

ⅰ亾dé卋堺 提交于 2019-12-04 02:10:23
When I run git blame on a file in a folder e,g,: git blame Foo/FileA.txt it returns fatal: no such path 'Foo/FileA.txt' in HEAD I can clearly see that this file exists on the file system, and other files in the same folder can be successfully blamed - so what is going on? I'm posting this question and answer as it had me stumped for a while today, and I couldn't find a single answer that hit all of the solution. This is due to renaming a parent folder on the file system with a new name that varies only by case - and some files were added in a commit occurring before the rename of the folder.

Maven classworlds.launcher.Launcher error in Git for Windows (64-bit)

社会主义新天地 提交于 2019-11-30 09:13:03
I've been using Maven on Git Bash (64-bit) for a few months now, and suddenly it stopped working, and is now generating this error on any maven command: myuser@mypc MINGW64 ~ (master *) $ mvn -v Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher I have reviewed many questions on SO, including this one: Maven error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher but have not solved my problem. I have upgraded to the latest Git for Windows (2.14.2.windows.2) from 2.12 but the problem remains. My Maven installation is at

Git Extensions “function not implemented”

橙三吉。 提交于 2019-11-29 13:44:49
I'm trying to use Git Extensions on a new Windows 7 machine. I have done that many times before but never hit this particular issue. Git Bash is working, I successfully cloned a repository. But going to Git Extensions, opening the repo, and doing a pull gives me the following error message: "C:\Program Files (x86)\Git\bin\git.exe" pull --progress "origin" error: cannot spawn git: Function not implemented Done Press Enter or Esc to close console... My setup is very ordinary. The Git Extensions startup checks all pass. (This is similar but not the same problem as the common invalid path issue.)