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
9 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 ...
11
votes
2answers
33k views

Storing username and password in Git

When I do git push I get the command prompt like Username for 'https://github.com': then I enter my username manually like Username for 'https://github.com': myusername and then I hit Enter ...
-3
votes
1answer
36 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: ...
9
votes
5answers
23k views

Unmet dependencies while installing Git on Debian

I am attempting to install git on Debian 8.6 Jessie and have run into some dependency issues. What's odd is that I didn't have any issues the few times I recently installed Git in a VM while I was ...
0
votes
0answers
18 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
2k views

branch name in Jenkins regular pipeline job

For a Jenkins pipeline job having web-hook trigger in Git/Bitbucket, each repo push triggers pipeline job. How we can know branch name in pipeline job on which push/change is committed. I need this ...
1
vote
1answer
40 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 ...
0
votes
2answers
2k views

Compile Git to use OpenSSL library libssl.so.1.0.1

Running a system that only has full support for OpenSSL version 0.9.8. Installed in parallel is OpenSSL 1.0.1 libraries (Supported by Distro) Git still preferentially uses the 0.9.8 libraries but we ...
6
votes
2answers
2k views

How to replay Git repository history into subdirectory?

Let's say I've got two repositories aye and bee and I want to get rid of bee, in such a way that the linear history of bee/master is "replayed" in a new subdirectory (several levels deep) of aye. I ...
1
vote
2answers
37 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
votes
0answers
45 views

Shell script to delete git branches

I want to delete git remote branches which are merged and branches older than some date. I have used below code from https://gist.github.com/jasonrudolph/1810768 to list remote git branches and the ...
2
votes
3answers
61 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 ...
-2
votes
2answers
2k views

restore after “git rm”

I initialized git repo in some_dir_path with git init. After that, I decided not to include all files into repo and issued git rm -f. As I thought, it would remove all files from git repo, not from ...
2
votes
3answers
673 views

Delete any file mentioned in .gitignore

I have the following entries in a .gitignore file and I want to remove them. The reason why is because these files are temporary-junk files created during a TeX compilation and I want to be able to ...
18
votes
4answers
13k views

How do I get a linux kernel patch set from the mailing list?

I don't subscribe to the linux-kernel mailing list, but I want to get a set of patches that were posted a few weeks ago and apply them to my kernel for testing. I'm very familiar with patching, ...
0
votes
2answers
1k views

Git clone from Bitbucket

I am trying to git clone a repo off of bitbucket. I use git clone {https} temp. This gives me an error of refs not found. The https address is the one I get off of bitbucket, but the one they provide ...
0
votes
1answer
35 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 ...
12
votes
4answers
3k views

Git based package manager/installer for Linux

Is there any linux distro that has a git based package manager/installer. I want something similar to FreeBSD Ports (which is CVS based, I think) or Mac OS X Homebrew (git based).
0
votes
0answers
18 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
2answers
56 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 ...
2
votes
2answers
4k views

Git asks for password when using SSH URL, ssh does not

I have three servers (two ubuntu 16.04, one mac mini) and several macbooks. One server ubuntu is for gitlab and the other is an internal site server. The mac mini is running a CI. Recently the ...
0
votes
1answer
28 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
41 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 ...
5
votes
2answers
2k views

Get git branch from several folders/repos

I have a folder with several repositories inside. Is there any way I can run git branch or whatever git command inside each folder? $ ls project1 project2 project3 ...
0
votes
0answers
34 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 ...
22
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 ...
3
votes
1answer
165 views

Can I manage my NixOS configuration in version control like git?

Long story short: I've used only distributions with "imperative configuration management/packaging" approach, so far. And,... I'm annoyed by hard to trace breakages/issues with imperative ...
1
vote
1answer
34 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 ...
7
votes
3answers
238 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
0answers
45 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
30 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
75 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 ...
3
votes
2answers
46 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 ...
0
votes
0answers
36 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 ...
1
vote
2answers
638 views

Changing the color of git branch output?

In my .bash_profile I have a parse_git_branch function from the internet, and a PS1 to color some of my output. If possible, I would like to make my git branch name colored red, instead of white. ...
1
vote
0answers
35 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-...
11
votes
2answers
514 views

How to use “less -F” without “-X”, but still display output if only one page?

I'm tweaking the pager of Git, but I've got some issues with it. What I want is: Always colored output Scrolling by touchpad or mouse Quit-if-one-screen And my current configuration is: $ git ...
0
votes
1answer
645 views

how does ~/git-credentials file look like?

Let's say I have a git repository for e.g. - https://salsa.debian.org/shirishag75-guest/gradle-build-script- Now in my system I have - :~/games/gradle-build-script-/.git$ cat config [core] ...
2
votes
0answers
103 views

How to handle multi-machine-dot-file-versioning

I'm thinking about versioning my dot-files via git on a public repository. I've moved all the interesting dot-files like .profiles or .vimrc to the repository and subsequently symlinked them to there ...
-4
votes
2answers
63 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.
2
votes
1answer
34 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 ...
22
votes
4answers
10k views

Given a git commit hash, how to find out which kernel release contains it?

Assume I have some issue that was fixed by a recent patch to the official Linux git repository. I have a work around, but I’d like to undo it when a release happens that contains my the fix. I know ...
0
votes
1answer
42 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
22 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-...
1
vote
1answer
986 views

Build CentOS RPM for current git release, unsuccessful rebuild with alternate prefix

I am stuck in an effort to provide an maintain an up-to-date git release for a collection of CentOS Linux servers. I was hoping to be able to create binary RPMs that I could just have published to a ...
1
vote
1answer
91 views

git ssh to ipv6 address on non-standard port

I am trying to access a git respository at a IPv6 address that has a SSH server listening on port 1111(for example). Access is controlled by SSH key and I can open a SSH session on the gitserver ...
1
vote
2answers
1k views

fatal: Reference has invalid format: 'refs/stash (1)'

I have recently upgraded from ubuntu 14.04 to 14.10 using apt-get dist-upgrade, which seems to have gone smoothly, except that I can no longer use one of my git repositories (on which I had local ...
2
votes
1answer
27 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
51 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 ...
2
votes
1answer
1k views

Customize Git Bash Color

I used to have a black / orange / green git bash color style. Now I needed to download it again and it's a mess (for me). All pink, lime green and yellow. It hurts my eyes. Is there a way to ...