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
-2
votes
0answers
34 views

How can i learn more about Linux Kernel using git [closed]

I want to learn in more deep on Linux Kernel. Linux kernel uses git for source code management. What all git commands can be used to know more about why a particular functionality is being added, ...
1
vote
0answers
21 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
26 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
25 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
23 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
2answers
106 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
23 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 ...
-1
votes
0answers
34 views

Where store all my certificate

I want to find out what the best way is to store my GitLab certificates. I'm writing Ansible script to install gitlab-runner and I need to add one certificate. I have GitLab CI and Nexus and I have ...
0
votes
1answer
63 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
46 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
63 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
20 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
55 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
74 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
42 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
40 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
24 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
48 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
38 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
36 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
66 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
13 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
54 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
25 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
65 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
52 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. ...
2
votes
3answers
68 views

Echoing from a variable in a specific part of a string

I am trying to make a command for having a nice-looking git log. Say I have the following: git log --color --pretty=format:"%C(cyan)<%an>" --abbrev-commit What I would like to do is to make a ...
0
votes
0answers
19 views

Why don't we need main module file in git unlike CVS?

How can we bind all the submodules with a main module in git? I am coming from CVS background where we have a main module file where we specify the commit ids of each submodules. How can we do so in ...
0
votes
1answer
41 views

Bulk login attempts on port 22 shutdown our SSH git server access, HTTPs still works though

Recently we have been seeing a lot of connections from IPs in to our public git server. When this happens, our devs are unable to commit via SSH as the server is very, very slow and I am unable to ...
0
votes
2answers
121 views

Backup Work dir to git before shutdown

I am using Ubuntu 16.04. I have a directory named Work which I want to backup to github everytime I poweroff my computer. I have written the backup script and it's working fine but I cannot run it ...
0
votes
1answer
29 views

Where i can find the github installed apps?

So i installed some github apps, by : git clone git://github.com/xxxxx.git cd [app's dir on my /home] sudo make install And now i need to remove it, should i remove that first directory? Or there's ...
2
votes
1answer
197 views

git status with submodule shows “new commits”

If I have a project with submodules, make changes in the submodule, and then commit those changes, the main project will show "new commits" on that submodule. However, if I "git pull" and update my ...
0
votes
0answers
163 views

How can I find my Git credential helper / manager?

I'm using my github account with ssh key on my CentOS 7 desktop. So, I don't need to input password for git commands such as git clone generally. But, I need to clone a private git repository of ...
1
vote
1answer
54 views

Mac OS xargs adds '?[m' at the end of line

I am trying to delete some local git branches with git branch -D $(git branch | grep 'RTL-1[1|2|3]' | xargs) However I am getting this kind of error error: branch 'RTL-1114_branch_name1?[m' not ...
23
votes
2answers
4k views

Why is less being run unnecessarily by git?

When I run git branch (from bash or csh), it automagically pipes the output through less. However, with only a few branches in the repository this is beyond unnecessary, it is annoying, as the branch ...
0
votes
0answers
110 views

Git Bash can’t quit less pager- q not working

I was referred here from stack overflow. having an issue with Git Bash/ Git for Windows (Windows 10). It seems that I am frequently but not always unable to quit git commands when they open up the ...
0
votes
1answer
35 views

Remove the second instance of a character from a string

I am working on making a git command I use more useful. A common task I do is to grep my git rev-list --all. I wrote (aka cut and pasted another StackExchange answer) git command to do this for me. ~/...
2
votes
1answer
82 views

How to gain superuser privileges without changing the current user?

I would like to keep my dotfiles and other configuration files (especially in the /etc directory) in the git repository. But in order to write inside the /etc directory git must be run as root. This ...
0
votes
0answers
53 views

Where to place machine's system-wide private ssh deploy key?

I'm following the directions at https://developer.github.com/enterprise/2.16/v3/guides/managing-deploy-keys/#deploy-keys , which includes Run the ssh-keygen procedure on your server to generate a ...
4
votes
2answers
138 views

How to get Branch Name from Tag

I have copied the repository from remote GitHub and now going into that git repository in local machine where repository downloaded. below am issuing command to fetch the branch name, but its not ...
1
vote
0answers
37 views

Git - extract subfolders of repository into new repositories

I have a folder structure like this, with all folders and files within one git repository: ├── folder-01 │   └── script.sh ├── folder-02 │   └── script.sh ├── folder-03 │   └── script.sh ├── folder-...
2
votes
1answer
38 views

Export git repository as (editable) ascii

LibreOffice can save files in .fodt which is a nice text format that you can edit and then read back in LibreOffice. The .fodt format contains the same information as the binary version. Is there ...
-4
votes
2answers
69 views

Can someone tell me what this command does?

I have encountered the following command in an internet tutorial. I couldn't understand how it works. git log | grep commit > ~/filename.txt Someone please explain me how it works.
7
votes
3answers
272 views

tracking crontab changes with git

I would like to use git to track changes in crontab. I have initialized a new git repository in /var/spool/cron/crontabs/ Now the problem is, when crontab is saved, the second line of the header ...
0
votes
1answer
82 views

How to enable `git gui` in NixOS?

I've installed git and tk, and I'm able to run git citool to display the Git GUI and create a single commit, after which the application exits. Unfortunately the git gui command itself says git: '...
1
vote
1answer
26 views

How to change git clone to other way if the folder is already downloaded manually by Shell Script?

I not familiar with shell script for due replace the git clone to another command, Below is the script: git clone https://github.com/yyuu/pyenv.git ~/.pyenv git clone https://github.com/yyuu/pyenv-...
2
votes
1answer
37 views

Ranger Run Custom .bash_profile Command

Suppose I have the following in my ~/.bash_profile file: function lazygit() { git add . git commit -a -m "$1" git push } I have run source .bash_profile and it works well in terminal on ...
1
vote
0answers
124 views

Why is “git pull” trying to use CURL_OPENSSL_3 while libcurl4-openssl-dev is installed?

When I run git pull I get the following error: git-remote-https: /usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by git-remote-https) Why is git trying to use ...