Questions tagged [git]

Git is an open source distributed version control system originally designed and written by Linus Torvalds. It is generally used to keep track of source code for software projects. As a DVCS, Git provides powerful help with branching, merging, and distributed development.

Filter by
Sorted by
Tagged with
0 votes
1 answer
1k views

Git clone failed on Windows due to file name length

I'm trying to clone a Git repository on a Windows machine that has an NTFS volume. Unfortunately I get several errors: error: unable to create file (...) Filename too long The files in question are ...
Radu Murzea's user avatar
0 votes
1 answer
333 views

terminal git status helper listed in .bashrc and .bash_profile not loading unless you source .bash_profile

I have the following neat helper, that I found online, that displays my current git branch at all times if I am in a git repo: parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -...
codyc4321's user avatar
  • 410
0 votes
1 answer
186 views

Source Tree - shows annoying popup after almost each action

I am using source tree as my versioning tool with git. I noticed that I always get a popup after trivial actions like creating a new branch. It is annoying and I always have to close it to be able to ...
Black's user avatar
  • 7,941
0 votes
0 answers
87 views

bash function to quickly push git commits not working

I have the following function in my bash_profile that used to work for years and no longer works: cmpushall() { git add -A; git commit "$1"; git push ;} I now get the following error: $ ...
codyc4321's user avatar
  • 410
0 votes
0 answers
78 views

How can I access files on home computer which were made on work computer?

I am working on a group project on two computers (work computer and home computer). This group project has directory on github. Directory can be accessed by other group members. Directory is cloned on ...
leskovecg's user avatar
0 votes
1 answer
36 views

How to push into GitHub if I didn't work on a project for a few days?

I haven't worked on my project for 5 days and now I can not push my new work. What I did: Create a new file in my project git add --all git commit -m "my text message" I get HEAD detached ...
J. Doe's user avatar
  • 17
4 votes
2 answers
413 views

Git mergetool vimdiff diff3 view changed showing only “LOCAL” files

When solving a merge conflict using Git and Vim as mergetool, I (suddenly) get a totally different view than I expected and am used to. In the past, I followed this blog post, where the result is a ...
claudio's user avatar
  • 41
0 votes
1 answer
7k views

How to use git pull with Jenkins sh steps?

git pull doesn't work with Jenkins for some reason. I've updated some files on my local PC and pushed it to my Github. I can see the changes there. Then I run Jenkins build that has sh commands to ...
J. Doe's user avatar
  • 17
0 votes
1 answer
6k views

Why does git fetch do nothing?

On my local pc I've updated my file. Then I: git add --all git commit -m "text message" git push I can see the changes I made on Github. Then I try to git fetch on my VM and it just says: ...
J. Doe's user avatar
  • 17
4 votes
3 answers
1k views

How to write wrapper function for git commands

I want to create a special alias for git log such that when I use that, it uses --graph and --pretty flags with a custom pretty format. I know I can use the git alias but, I don't want to cuz I want ...
Darkstar Dream's user avatar
1 vote
1 answer
909 views

How to upload new repo to BitBucket using git with SSH on Linux command line only?

Steps I've taken: ssh-keygen my key ssh-add -K ~/.ssh/<private_key_file> my key Add the public key to my BitBucket Account settings git config --add --global core.sshComand 'ssh -i ~/.ssh/id_rsa'...
J. Doe's user avatar
  • 17
0 votes
0 answers
251 views

Link a Local Directory to a Git Initialized Directory so they Sync when Changes are Made to Either One

Sorry if the question seems ignorant, and sorry for the bad misleading title; I can't describe my problem in one sentence. I run Arch Linux. I have a Git repository with my dotfiles (configs). And all ...
TechTycho's user avatar
1 vote
1 answer
366 views

Git Bash : neither .bash_aliases nor .gitconfig read automatically

I'm setting up a new computer, and, among other things, Git with Git Bash. I copied my .bash_aliases and .gitconfig from a previous computer, but I can't get Git Bash to source them automatically. ...
Charles's user avatar
  • 257
1 vote
1 answer
1k views

How to get full path of changes files only using git status in Windows?

Let's say I have changed two files in my project. My project is located at C:\Projects\Website. When I use git status --porcelain I get this result: M Component.jsx ?? Public/Index.html What I need ...
Ali EXE's user avatar
  • 175
1 vote
0 answers
277 views

MSYS2 man: can't open the manpath configuration file /etc/man_db.conf

I'm on Windows 10 but using bash and MSYS2 (mingw64). I just installed man using MSYS2. The problem is when typing a command like man echo (can be any command; it doesn't have to be echo), I get this ...
Verpous's user avatar
  • 131
0 votes
0 answers
713 views

ssh-agent is not keeping private key

Using an Ubuntu server, I have the following user: uid=1001(githubactions) gid=1001(githubactions) groups=1001(githubactions),27(sudo),33(www-data),998(docker) logged in as this user, I create a ssh ...
Peter Pan's user avatar
0 votes
0 answers
1k views

KEX error - "kex protocol error: type 30 seq 1" after windows 11 update

Local machine has a bitbucket repository cloned using SSH. After windows 11 update, git push/pull etc cause the error "kex protocol error: type 30 seq 1". I can't find a working solution ...
Sooraj L V's user avatar
0 votes
0 answers
4k views

Could not resolve host: on WSL ubuntu after trying to install anything

I am trying to set up nvim but this is a general problem with anything I attempt to install. As an example root@DESKTOP-NAME:~# git clone --depth 1 https://github.com/wbthomason/packer.nvim\ ~/.loc&...
Hydrolox's user avatar
1 vote
1 answer
129 views

Tracking file structure

git is good for tracking plain text and source code, but not for big or binary files. What is an efficient way of tracking file structure? By that I mean just their names not content. (This is helpful ...
AvidSeeker's user avatar
2 votes
1 answer
2k views

How to configure lazygit with git?

The lazygit application is a git client that is supposed to be simple to use. I have a .gitconfig file: [user] email = [email protected] name = Stephane Eybert [alias] ss = status ap = ...
Stephane's user avatar
  • 195
1 vote
0 answers
53 views

Using sudo in Git Extensions when pushing changes to remote Linux repo

I have Git Extensions v3.1.1 installed in Windows 7 Pro. Rephrased my problem description: Remote GIT repo is Debian Linux, I connect to it with myuser which has sudo permission. The /etc directory is ...
klor's user avatar
  • 159
0 votes
0 answers
197 views

git produces no output when called from script via cron (log/shortlog)

I've got a script git-test going to a local git repo and calling git shortlog to keep track of recent changes. For testing purposes, I just used these lines: #!/bin/bash cd /myrepo.git result="$(/...
Netnoob's user avatar
0 votes
0 answers
176 views

Reverse SSH on Windows Git BASH

I have multiples Windows 10 computer where I can't open anymore ports, neither install more software. But those computers have git bash installed on it. I would like to be able to run some bash script ...
olive007's user avatar
  • 121
1 vote
1 answer
133 views

(Dis-)Advantages of using generic git user for SSH based access

We are using the generic git user to access git repositories on our server via SSH. My understanding was, that this is kind of a defacto standard when accessing git repositories. Now that we are ...
ulrich's user avatar
  • 111
0 votes
0 answers
1k views

How to fix permission denied publickey on Windows10 Git Bash?

I'm unable to ssh into a machine that operates bots of my friend. He added my public ssh key, so i can join, but I get the permission denied privatkey error message. I removed the actual ip $ ssh -vT ...
Timm's user avatar
  • 1
1 vote
1 answer
3k views

Git commit signing with SSH keys — stubborn error about allowedSignersFile

I'm trying to set up git commit signing using SSH keys (instead of PGP/GPG). It's a relatively fresh feature, added in git 2.34. I did follow all the steps (well documented in man git-config gpg.ssh ...
ulidtko's user avatar
  • 2,946
1 vote
0 answers
829 views

process exited with code 1 (0x00000001) after Git update 2.36.1 on Windows 10

After I tried to update my Git version to 2.36.1, on my Windows 10 machine I've been getting this error in the Windows terminal: [process exited with code 1 (0x00000001)] I have tried to check for ...
Krullmizter's user avatar
0 votes
1 answer
528 views

git remote update not working

RHEL Server 8 logged in as user with root access. I have a private mirror of a public repo that is on github. The private mirror is being used as a git server repo locally. I'm trying to update the ...
MarkAGregory's user avatar
0 votes
2 answers
1k views

How to change the Git SSH password remember setting?

Git allows using an RSA fingerprint or ED25519 to do a pull or push to GitHub. When adding the key and pushing for the first time, we are asked (via a modal box of Ubuntu's GUI) if we want Git to ...
Nav's user avatar
  • 1,069
3 votes
2 answers
2k views

Gitlab repocheck finds dangling blobs and marks the text as failed

I have a self-hosted gitlab instance and suddenly one of my projects is sending emails telling me that the repo check is failing. I run gitlab-15.0.0-ee via docker. I checked the log file repocheck....
Pablo's user avatar
  • 131
1 vote
1 answer
8k views

Windows' Git errors out with 'permission denied (public key)' when trying to access BitBucket via 'git pull' even though the ssh-key is correct

I'm running: Windows 10 (latest updates) Git version 'git version 2.36.1.windows.1' SSH -V returns: OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2 In the properties-dialog all executables inside C:\...
XDS's user avatar
  • 131
1 vote
0 answers
101 views

How to keep Zotero collections in sync with collaborators via git?

I am using Zotero/Latex for academic writing and citations, yet I am wondering about the cleanest way to collaborate on a scientific manuscript via Zotero and git/github. I am happily using the ...
Nico Autia's user avatar
0 votes
1 answer
66 views

ssh_config auto restored after some time

I need to connect to git using an ed25519 SSH key, but the /etc/ssh/ssh_config only has the entries below for IdentityFile, so I receive error Permission denied (publickey) when accessing the git repo:...
MUKHTAR INAMDAR's user avatar
0 votes
1 answer
381 views

How to fix this git automation script?

I have this simple script to automate git status for a lot of git repositories: @ECHO OFF for /D %%s in (C:\Projects\*) do ( set HasChangesCommand=git -C %%s status --porcelain | findstr . &&...
Ali EXE's user avatar
  • 175
6 votes
2 answers
2k views

Configure git completion for checkout to only show local branches?

I'm not sure where git completion is implemented but I'm on MacOS, running zsh, and oh-my-zsh. If I type git branch -v I see I have 4 local branches > git branch -v dangling-pointer ...
gman's user avatar
  • 5,303
0 votes
0 answers
1k views

Installing Git LFS

I'm following this guide. When I have to run this trainer: trainer = Seq2SeqTrainer( model, args, train_dataset=tokenized_datasets, eval_dataset=tokenized_eval, data_collator=...
zest16's user avatar
  • 119
1 vote
1 answer
963 views

Git credentials in a shared virtual machine

A friend and I want to use a (Ubuntu) VM to develop code. The main app is Visual Studio Code. The idea of the VM is that it can guarantee that we both have the same versions of the same VS Code ...
Mawg's user avatar
  • 4,431
0 votes
1 answer
2k views

ssh-agent no longer working

I used to execute eval $(ssh-agent -s) from git bash. It would give me a message and all was fine. Today, it's no longer outputting anything and a ps -ef | grep ssh yields no results. It's like ssh-...
RobHay's user avatar
  • 1
3 votes
1 answer
3k views

Capture Git output in a Bash variable

I want to capture a command execution output like below: $ o=$( git clone [email protected]:my-repo/demo.git ) Cloning into 'demo'... remote: Counting objects: 176, done. remote: Compressing objects: 100% ...
j4x's user avatar
  • 227
1 vote
0 answers
140 views

Installed Windows 10, file permissions causing all sorts of problems with cygwin

A little bit about my setup: Was previously running Windows 7 with 0Patch, finally installed Windows 10 (clean install). All of my data is stored within an encrypted VHD (TrueCrypt/VeraCrypt) on a ...
autobottodoggo's user avatar
0 votes
0 answers
741 views

lerna run `lerna version patch` throw error git remote update Permission denied?

I use lerna and want to use lerna version to manage my version。 I add password to my ssh key. I can do git remote update by inputted my password . But i cannot use lerna version patch and it give me ...
radiorz's user avatar
  • 101
0 votes
1 answer
1k views

Purpose of adding ssh identity file to ssh agent and keychain

I noticed that the Github instructions for adding an ssh key to your account say that you need to add the key to both your ~/.ssh/config file AND to the ssh agent with ssh-add https://docs.github.com/...
rasen58's user avatar
  • 173
0 votes
1 answer
564 views

Github Desktop branch selector shows branches from upstream AND origin?

I'm learning to contribute to open-source projects on Github. I want to try fixing an issue that applies to the 3.x branch, but I'm confused why Github Desktop is showing me branches from both origin ...
Clonkex's user avatar
  • 1,097
2 votes
1 answer
3k views

Find the default branch name for a Git repository?

I would like to be able to ask Git "what is the default branch name for this repository?" and I would expect either main or master as the result. I've search git config but haven't been able ...
Steven Hepting's user avatar
0 votes
1 answer
417 views

How to I undo already commited changes only for a chosen line = at "line level" (not the whole file) in codium/vscode?

Use case. I have committed a file with many changes, and I forgot to make a new commit for a much smaller side-task - to clean the file from some personal outdated e-mails I found in there, which has ...
questionto42's user avatar
  • 2,331
1 vote
0 answers
380 views

How to access Synology git server remotely?

I can access the git server when using the same WiFi. But if I switch to mobile network, I can no longer access it. DSM version 7.0 Does the NAS have a VPN or other phone home to get me back to the ...
Fisher's user avatar
  • 687
0 votes
1 answer
103 views

git status: How to ignore content changes?

I'm not interested in file content changes, just: if new file is created file is removed file is renamed (combination of the first 2 items) So if file already committed is temporarily changed it ...
user3719454's user avatar
3 votes
1 answer
5k views

fatal: unsafe repository on mounted volume

I have a startup mounted volume which contains several git repositories, and I have no idea why, but starting today I can't make git operations in these repositories. I have this error message: fatal: ...
MrSquaare's user avatar
2 votes
1 answer
7k views

Bitbucket / SourceTree authentication failure

On some occasions and currently NOW SourceTree will not allow me do any operations against My bitbucket repository and keeps popping up to choose a credention helper of which I have no clue which one ...
edelwater's user avatar
  • 707
2 votes
1 answer
570 views

Why Does Git Locally Delete My Empty Directory?

If I am understanding the answers here correctly, git should not track an empty directory, but should not delete it locally. This is not the behavior I am experiencing. Directory dir_foo/ exists on ...
MindSeeker's user avatar

1 2 3
4
5
55