201 questions
1
vote
1
answer
85
views
How do I provide the correct file paths to merge-doc.js in Git config using Git bash in Windows?
I'm trying to use the merge-doc.js script in my Git config for merge driver and mergetool for .docx, but the TortoiseGit helper script that starts a compare in Word using DCOM requires absolute paths ...
1
vote
1
answer
55
views
aux': Invalid argument warning: Clone succeeded, but checkout failed
When I try to clone a company project, this error appears. Everyone else is on Mac, but I am on Windows. How can I solve it.
cannot create directory at 'nebula-hubble/hubble-service/src/main/java/com/...
-2
votes
1
answer
138
views
git init not initializing git repo in directory
I am just trying to run the git init command, with a fresh copy of git installed; as of writing this version git version 2.47.1.windows.2, and their is not .git directory in the main directory. I run ...
1
vote
2
answers
1k
views
Git shows all files changed when "git init" was used in WSL and "git diff" in Windows
If I use git init in WSL, then continue with git operations in Windows, git for Windows will show that most or all files have changed, even if they haven't.
Notably, the inverse produces no issue. ...
1
vote
2
answers
411
views
Cannot use command substitution inside Git Bash on Windows: "bash: command substitution: line 1: syntax error near unexpected token `)'" [duplicate]
In a Bash terminal on Linux, this works fine:
# define some bash func
foo() {
echo "foo"
}
# Back up your system's default PS1 prompt 1 string, which controls the prompt
# output
if [ -...
0
votes
0
answers
17
views
How to execute a script with "source" from .bashrc? [duplicate]
I have this script:
$WORKSPACE/bt-helper/navigate_to_project.sh
#!/bin/bash
this_dir="${0%/*}"
echo -e "Script dir: $this_dir"
echo -e "Argument 0: $0"
echo -e "...
0
votes
1
answer
335
views
Issue with cp when copying exe files in Msys2 or Git Bash in Windows
I came across a weird issue with cp in Git Bash, and same for Msys2 shell. When copying an exe file (e.g., some-file.exe) along with a file with the same name but no extension (e.g., some-file), it ...
0
votes
0
answers
295
views
Adding Bash Scripts to Git from Windows - Set Executable Bit
Is there a way to automatically set the execution bit upon committing a new bash script from a Windows machine?
The manual way to do it is git update-index --chmod=+x myscript.sh - but this is ...
-1
votes
1
answer
141
views
Git 'ls-files' command showing a weird non-existent string as a file on Windows, how to analyze and delete it? [duplicate]
I ran git ls-files in my GitHub wiki repo and got the strangest file, listed actually as a string ending with ".md". The file, as far as I can tell, does not even exist.
it certainly does ...
7
votes
2
answers
4k
views
Git Credential Manager failing with unsupported browser error
I'm using Git For Windows 2.40.1 on Windows 10 to access a repository on Azure DevOps. It was working fine on Friday, today it's broken.
Any attempt to access the repo launches the Git Credential ...
15
votes
1
answer
6k
views
Git Credential Manager is using IE but I want it to use Edge
I created a new Windows Server 2022 VM, installed all pending updates, then installed the latest versions of Office 365 and Visual Studio 2022.
Edge is already the system default browser:
When I try ...
1
vote
1
answer
310
views
Using a local variable in a function when setting a git alias
I am using Windows 11 and git and trying to create a alias which will checkout and pull a branch before checking out the original branch, merging the just pulled branch and then push. I am having ...
0
votes
1
answer
38
views
Windows: git commit -a sends wrong networked drive path to editor
With the repo on Windows networked drive, "git commit -a" sends the wrong path to the text editor.
When the repo is on an internal drive, "git commit -a" works as expected, the ...
1
vote
0
answers
2k
views
What's the proper way to set git email and name in Visual Studio Code?
I'm getting the following error in Visual Studio Code on Windows when I try to commit code:
2022-12-19 07:17:00.902 [info] Author identity unknown
*** Please tell me who you are.
Run
git config --...
0
votes
1
answer
544
views
Git won't recognize aliases from local config file
Issue:
I have manually added a simple alias in ~/.gitconfig (git version 2.38.1.windows.1), and it looks like this:
[alias]
lg = !git log --oneline --graph -$1 #
I use it as follows (expecting to ...
2
votes
1
answer
957
views
How to use Visual Studio diff *only* for git diffs started from Visual Studio
I have configured my Git for Windows installation to use Beyond Compare (BC) for diffs and merges from the command line.
Unfortunately, when I'm working in Visual Studio 2022 and start a comparison ...
1
vote
0
answers
9k
views
Git repo returns dubious ownership when not run as admin
Last week I created a git repo for a project. This morning, I tried git status which results in fatal: detected dubious ownership in repository at 'C:/ProjectPath/ProjectName'.
I believe I created the ...
12
votes
2
answers
13k
views
Why does signing commit with SSH key fail with "invalid format?" and "failed to write commit object"?
I followed GitHub's instructions for telling git about my SSH key, but when I tried to sign a commit
git commit -S
I got this error:
error: Load key
"C:\\Users\\MyName\\AppData\\Local\\Temp/....
6
votes
3
answers
14k
views
How to change ownership of a local GIT repository on Windows 11
I am a relatively new/light GIT user. I use a local git repository to backup my code and I have not setup a remote repository on github.com or any other remote repository hosting system. I am working ...
1
vote
1
answer
304
views
Checkout error when trying to clone private github repository (flutter)
I tried to clone a private repository which I had access, the cloning is success but the checkout were error in windows(it's working fine on linux)
this are the error:
git checkout -q --track origin/...
2
votes
1
answer
1k
views
Why does Git for Windows helper = manager not work on new machine?
I was running Git for Windows 2.37.1.windows.1 just fine on a Windows 10 machine. I've been updating Git for Windows on that old machine for years. My ~/gitconfig file contained:
[credential]
...
4
votes
2
answers
1k
views
Git repository is not recognized unless VSCode is opened as administrator
I have git installed, according to the CLI, it's version '2.36.0.windows.1'.
I have the latest VSCode, version '1.69.1 (user setup)'.
I am on Windows 10 Home, version '21H2 (build 19044)'.
I have a ...
17
votes
7
answers
32k
views
Git suddenly won't authenticate to GitHub automatically
I wanted to push to a remote repo on GitHub. I typed git pull origin main exactly as I have a hundred times but I get the error:
fatal: Unable to persist credentials with the 'wincredman' credential ...
11
votes
8
answers
20k
views
The folder currently open doesn't have a git repository
I am working on a work PC which has a windows OS and I'm used to using ubuntu OS for rails development.
I installed everything properly with wsl as ubuntu on VSCode and git for windows but the problem ...
0
votes
1
answer
993
views
Error running git submodule commands outside git-bash on Windows
I'm working on a project with git submodules and sometimes need to run commands like git submodule init and git submodule update. I'm runnig Git for Windows 2.35.2.
The problem is that these very ...