Questions tagged [git]

Git is a free & open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

Sudo and Git problem in kali linux used in VM in windows 10

I have windows 10 . Now i have installed VM and in it i have installed kali linux. But the problem is that whenever i try to put git or sudo commands it shows -bash: sudo: command not found or -bash: ...
0
votes
0answers
23 views

Why my WSL ubuntu 18.04 is showing me black screen [closed]

I was trying to use WSL, so i enabled it & virtualization's setting in control panel>windows feature on/off restarted pc, opened Ubuntu 18.04 in administrative mode. The CLI opened but did't show ...
0
votes
0answers
23 views

evaluate bash builtins in sed in git clean filter

I am trying to write a git clean filter and I want it to include the current date (as well as other info). It targets a tag that looks like this $Id$. This is what I have so far: [filter "update_id"] ...
0
votes
0answers
16 views

fatal: ambiguous argument 'branch' unknown revision or path not in the working tree

I'm working on a script and inside that in one step I'm trying to get the latest commit hash of one of my git branches. So my code looks like: cd $sourceDirectory COMMIT_HASH=$(git rev-parse $...
-3
votes
1answer
61 views

Can't install Git in kali Linux!

I am a new kali Linux user and after installing kali linux i tried to install git but i am getting a message where it says E: Could not open lock file/var/lib/dpkg/lock -fronted -open (13: ...
0
votes
1answer
15 views

Make index reflect files at given paths in worktree, including their presence

I have a script which updates a repository, and adds / deletes files at some given paths. How can I commit these changes knowing the paths? I.e., If a specified file is in the worktree, copy it to ...
0
votes
1answer
35 views

How can I build a new project to Github using bash?

I am trying to learn git. How can I put the file juna.py to Github in a new project? I am working in Ubuntu. I tried git init Reinitialized existing Git repository in /home/jaakko/juna/.git/ (base) ...
0
votes
1answer
46 views

Can not install git/ not able to install any kali linux tools

I just installed today. I mainly work with kali but i wanted to try this. Any help would be appreciated! root@ubuntu:/home/<MY USERNAME># apt-get install git Reading package lists... Done ...
0
votes
1answer
25 views

git fsck shows duplicateEntries but I'm able to git pull and push

I have a repository where git fsck command gives me the following error: error in tree b2b510c83ea553c587ebe5bc160e92cb7888393a: duplicateEntries: contains duplicate file entries However, I am able ...
0
votes
0answers
8 views

Python venv module cannot add virtual environment name to PS1, when using PROMPT_COMMAND?

I use the official Git Bash prompt support for displaying the current branch as part of the prompt. My problem is that activating a Python virtual environment (python -m venv <dir>) using ...
1
vote
1answer
66 views

git fsck fails with the same error for 4 different repositories

I'm running git fsck command on some repositories, and for 4 of them I got the same error: error in tree b2b510c83ea553c587ebe5bc160e92cb7888393a: duplicateEntries: contains duplicate file entries ...
0
votes
0answers
33 views

How to pass username and password of a bitbucket repository to a shell script triggered via jenkins

I am trying to create a Jenkins job that will trigger a shell script via the option Send files or execute commands over SSH in Jenkins. The following is the main part of my shell script: #!/bin/bash ...
0
votes
3answers
25 views

How to prepend lines to git command output

This is part of a larger script but I distilled the problem down to this: cm_safe(){ git push | while read line; do echo "cm safe push: $line" done; } I want to prepend git output, so it ...
1
vote
1answer
42 views

openssl is not finding any certificates

When I use git or curl I get an error which may be related to certificates: With git: > git clone https://github.com/vim/vim.git Cloning into 'vim'... fatal: unable to access 'https://github.com/...
0
votes
1answer
47 views

different behavior for git fsck

I have two servers which I'm running the command git fsck on specific bitbucket repository. in both servers, I'm getting this output: Checking object directories: 100% (256/256), done. error: object ...
0
votes
1answer
46 views

Help with writing script file for bitbucket repositories File System ChecK

I have the below path for our Bitbucket repositories /bbshared_storage/archive/data/repositories The directories inside go by numbers (each number represent repository): 1000, 1001,1002 and so on. ...
0
votes
0answers
20 views

Why is my git tab completion not working?

I have downloaded git-completion.bash and git-completion.tcsh from https://github.com/git/git/tree/master/contrib/completion and followed the instructions to setup git tab completion for tcsh but tab ...
0
votes
2answers
28 views

Setting up a git server with ssh access

I want to set up a server that hosts git repositories over ssh and https with client certificates. I don't want any snazzy GUI or anything like that (i.e. not Bitbucket, GitLab, etc) I want a bare ...
-1
votes
2answers
59 views

Create sanity for GIT clone

I want to create a Jenkins pipeline which runs GIT clone sanity every 5 minutes. how can I catch error/issue if the GIT clone command is not working/fails or passed?
0
votes
1answer
36 views

issue with bash arrays containing both commands and paths

I'm trying to write a script to tailor my dotfile setup to each machine using git update-index -skip-worktree but it keeps chopping up the paths. I'm passing arrays starting with commands where every ...
0
votes
1answer
59 views

shell script to run commands after sudo su - appuser

My organization gives me no access to root and has some very weird authentication that is explained below: I login to the RHEL server using my username and password combination via ssh terminal I am ...
1
vote
1answer
55 views

Can't install git on debian9 (stretch)

I want to install git on my debian 9 (stretch ) machine , when I type : sudo apt install git-all I get this message : Reading package lists... Done Building dependency tree Reading state ...
0
votes
2answers
62 views

Sort contents of folder by their git time

I want to sort the files in a folder by the time they were added to git. I looked at git ls-files sort by modification time, but this gives me all the files in git by time. I want only the files/...
0
votes
1answer
54 views

How to makepkg a git repository outside of the file

I'm trying to build a file called command.sh, which will just host a series of terminal commands that will install the software I need when I decide to buy a new computer. Its just the convenience of ...
1
vote
0answers
26 views

Why am I still getting a password prompt for git pull even after providing certificate and key

I have added http.sslCert and http.sslKey in git global config file and set http.sslVerify to false but still getting password prompt for git pull. Tried googling for reasons but could not find ...
0
votes
0answers
55 views

Host key verification failed after changing MAC address

I changed my MAC address, I believe using sudo ip link set dev interface address XX:XX:XX:XX:XX:XX, in order to be assigned a new local IP address to fix some network issues I was having. This worked ...
0
votes
1answer
79 views

Ansible git Permission denied (publickey)

fatal: [10.1.38.15]: FAILED! => {"changed": false, "cmd": "/bin/git clone --bare 'ssh:********@enterprise.acme.net:7999/acme/acme-whm.git' /usr/local/acme/.git", "msg": "Warning: Permanently added '[...
1
vote
1answer
49 views

Permission changed from 600 to 664 after git push-pull

I have files in my git directory that have permission 600. When I used git-pull in my computer and git-push in another computer, the permission changes to 664. Is there a way to preserve ...
2
votes
3answers
218 views

How do I get Git 2.24 installed on Debian Buster?

I'm trying to get the most recent version of Git installed onto my Debian Buster machine, and I'm running into trouble. The most recent version of Git on stable is 2.20. I found that the testing ...
1
vote
1answer
29 views

How to make output of one git command result as input parameter of another git result?

I am using following for getting a git Commit ID: git log -1 --oneline | awk '{print $1} and suppose i am getting 123456 as commit id output but now i want to use this id like this: git log 123456 ...
0
votes
1answer
106 views

How can I make bash script exit silently?

I have created CI (Continuous Integration) between GitLab, Docker and AWS with the following configuration: Dockerfile. # install node.js FROM node:latest # create necessary directories and # ...
1
vote
1answer
101 views

Help with git in zsh prompt

So, I want to add git to my custom prompt. What I want it to do is: Show the name of the branch Change color of the name of the branch if there are uncommitted changes inside the repo I know there ...
2
votes
2answers
85 views

How can I combine the ssh and cd commands?

I am trying to write a bash-script to update a remote git repo. The script looks something like: #!/bin/bash ssh user@remote.de 'cd /home/h/usr/praktikum | git pull | sbatch run.sh' However, the ...
1
vote
1answer
45 views

Which (if any) union filesystems allow you to mount them without an underlying filesystem?

I am considering using a union filesystem, such as aufs, UnionFS or OverlayFS. I have a 138GB of Android source, to which I want to make minor changes and keep them under version control. My plan is ...
0
votes
1answer
118 views

Git - handle symlink as if it was a file

Is there a way to make git handle a symlink as if it was a file. If I just normally add a symlink like git add symlink, git just stores/controlls the path to the file, not the linked file. Is it ...
0
votes
0answers
123 views

ssh hangs for git push

I have setup a git server on a remote machine. I can connect to it through ssh with no problem and also git pull from it. I can however not git push to it and attempting to do so results in the ...
0
votes
1answer
81 views

Can I use a SSH key with git directly, without depending on ssh-agent?

I have a SSH key to allow me to push to a certain repository. No problem there with the key itself - however, I don't want to copy the key to a .ssh folder or leave the SSH key with ssh-agent (on ...
1
vote
1answer
84 views

Zsh file autocompletion with bare git repo

I have this in my .zshrc: # command completion autoload -Uz compinit compinit usually letting me tab through commands, args, and files. But with git --git-dir=<the path> --work-tree="$HOME" (...
0
votes
0answers
31 views

Syntax highlighting for git syntax in gedit

Is there a way to automatically get syntax highlighting for git syntax in gedit? I set gedit as my default git editor with git config --global core.editor "gedit -s". Now when I type git commit, ...
0
votes
1answer
16 views

RSA handling different between Container and Ubuntu

I have two Ubuntu environments (one Container and one machine), which handle the same rsa private key pretty differently. The first noticable change I see in the logs, is that they identify the type ...
0
votes
0answers
108 views

Permission issues with NFS exporting FUSE (mergerfs) filesystem (git permission issues)

I have a mergerfs filesystem /data which merges /data1 /data2 /data3 /data4, each of which are ext4 filesystems. I am exporting the directory /data/coihome (actually a directory in /data3) via NFS to ...
0
votes
1answer
41 views

ksh prompt defined as function with newlines

I wrote myself a pretty, git aware ksh prompt function. Here I only include a minimal working example so that you can see my problem without all the bloat: #!/bin/ksh function _test_prompt { ...
0
votes
1answer
61 views

Git repository server GIT_PROJECT_ROOT

I'm trying to configure my own git repository server with Git SmartHTTP and Apache2. So followed these instuctions from the official git manual. But during the configuration it becomes not clear to me,...
0
votes
0answers
143 views

Git Bash: “No such file or directory” after creating directory and trying to create a file

I am trying to get to a point where I have a GIT alias to make things a little quicker. I am getting an output of files changed in our repository so we can do some scanning of those files. I want to ...
0
votes
0answers
16 views

Return to waiting terminal after finished with GUI app (for external mergetool)

When using an external GUI app for git mergetool, the shell sits in the background waiting patiently. When I save and close the GUI window, the shell returns to the foreground and git is main app ...
0
votes
0answers
15 views

How to do custom build of git with portage

I would like to add a 'profile' local flag for my git install that uses the profile build options referenced here: https://github.com/git/git/blob/master/INSTALL According to the INSTALL file, I ...
-3
votes
1answer
71 views

Cannot install git on rhel 7?

[root@server14 git-2.1.2]# make install CC credential-store.o In file included from cache.h:4:0, from credential-store.c:1: git-compat-util.h:213:25: fatal error: openssl/ssl.h: ...
0
votes
0answers
27 views

Capturing output from `git push` so I can auto open the “create new PR” url

I'm trying to write a bash script to auto-open the url that is displayed to create a new PR when you push a branch to origin the first time. This is what I got and always shows "NO MATCH" when I do ...
1
vote
1answer
89 views

Add an SSH key on boot

I have a Git repo that is authenticated with an SSH key - the key is not the standard id_rsa. I can run: eval $(ssh-agent -s) ssh-add /home/forge/.ssh/otherkey Then git pull origin master This ...
1
vote
2answers
61 views

How to find out which files get installed with make?

A lot of repositories on Github have an "automatic" installer like the one posted below. I always wonder how to find out which binaries will get installed but I can not figure it out from the script. ...

1
2 3 4 5
16