Questions tagged [git]

Git is a distributed source control system.

Filter by
Sorted by
Tagged with
558 votes
33 answers
1.2m views

How do I tell Git for Windows where to find my private RSA key?

My Git setup runs fine on Linux, but when I try to set things up under Windows (using Git for Windows and TortoiseGit), I don't know where to put my private SSH key (or, better still, how to tell ssh ...
binaryorganic's user avatar
244 votes
10 answers
163k views

How to tell which local branch is tracking which remote branch in Git?

I would like to know if there's a way to tell which local branch is tracking which remote branch in Git. I'm using one remote server, which is named "origin".
PJ.'s user avatar
  • 3,027
239 votes
10 answers
303k views

How do I share a Git repository with multiple users on a machine?

I have a Git repository on a staging server which multiple developers need to be able to pull to. git-init seems to have a flag very close to what I'm looking for: --shared, except I'd like multiple ...
Andrey Fedorov's user avatar
201 votes
6 answers
189k views

Non interactive git clone (ssh fingerprint prompt) [duplicate]

I want to clone a repo in a non-interactive way. When cloning, git asks to confirm host's fingerprint: The authenticity of host 'bitbucket.org (207.223.240.182)' can't be established. RSA key ...
qwe's user avatar
  • 2,057
121 votes
17 answers
81k views

GIT as a backup tool

On a server, install git cd / git init git add . git commit -a -m "Yes, this is server" Then get /.git/ to point to a network drive (SAN, NFS, Samba whatever) or different disk. Use a cron job every ...
user avatar
119 votes
4 answers
215k views

What firewall ports need to be open to allow access to external git repositories?

What firewall port(s) need to be open to allow access to external git repositories?
markdorison's user avatar
  • 1,325
111 votes
12 answers
82k views

How do I prevent apache from serving the .git directory?

I have started using git for deployment of websites for testing. How do I prevent apache from serving the .git directory contents? I tried <Directorymatch "^/.*/\.svn/"> Order deny,allow Deny ...
Shoan's user avatar
  • 1,735
107 votes
7 answers
82k views

How to retrieve the last modification date of all files in a Git repository

I know how to retrieve the last modification date of a single file in a Git repository: git log -1 --format="%ad" -- path/to/file Is there a simple and efficient way to do the same for all ...
Eric Bréchemier's user avatar
78 votes
4 answers
49k views

How do I edit git's history to correct an incorrect email address/name [closed]

When I started using git I just did a git init and started calling add and commit. Now I am starting to pay attention and I can see that my commits are showing up as cowens@localmachine, rather than ...
Chas. Owens's user avatar
  • 2,083
78 votes
11 answers
61k views

Where's the conventional place to store git repositories in a linux file system tree?

If I make an analogy with the hosting of a web server, I would say that git's data should be in /var/git, so my git repository would be in /var/git/myrepo Q: Is that the right guess ?
Samuel Rossille's user avatar
66 votes
12 answers
127k views

Install a newer version of Git on CentOS 7

I like to enable Git "Push to Deploy" on my CentOS 7 server. Currently I only can get Git 1.8.3.1 via yum. I need a newer version. Do I have to build it from source or is there any repo I can use? I ...
Oliver's user avatar
  • 771
66 votes
4 answers
243k views

git fetch specific revision from remote repository

We have a remote git repo that we normally deploy from using git push on our dev server then git pull on on our live servers to get the latest pushed version of the repo. But if we have committed and ...
dlrust's user avatar
  • 715
60 votes
5 answers
305k views

How to give username/password to git clone in a script, but not store credentials in .git/config

I am cloning a git repository in a script like this: git clone https://user:[email protected]/name/.git This works, but my username and my password! are now stored in the origin url in .git/config. ...
Nathan's user avatar
  • 733
46 votes
5 answers
126k views

Specify SSH Port for Git

I use a non-standard ssh port (1234) for most of the servers I connect to. So in my ssh config file I have: Port 1234 But github.com uses port 22. When I try to connect to github it obviously ...
James Ward's user avatar
32 votes
6 answers
31k views

Using rsync from msysgit for binary files

I have three windows boxes that are connected to a linux box on my network in various ways (one's local to the network, one is a laptop and may or may not be local, and the other is my work desktop). ...
Will Gant's user avatar
  • 331
30 votes
5 answers
59k views

How to install git to red hat enterprise linux 5.3 x64?

How can I configure yum to use some repository which has git rpms?
BuyManAFish's user avatar
28 votes
2 answers
24k views

What are the pros and cons of SSH and HTTP for a git server?

I want to setup a git server. I have found several how-to's, well detailed. Some describe the installation for a git-server accessible thru Ssh, while others, accessible thru HTTP. ( Others even ...
Stephane Rolland's user avatar
27 votes
5 answers
48k views

Git shell not enabled?

I'm trying to install git server. When I set default shell for my git user to /usr/bin/git-shell I get an error upon login as git. fatal: Interactive git shell is not enabled. hint: ~/git-shell-...
Peter's user avatar
  • 405
26 votes
7 answers
40k views

git clone - fail instead of prompting for credentials

When cloning git repositories in automated tools - web front ends, CI systems, sometimes the git clone invocation opens up a prompt asking for the username and password (for example, when cloning a ...
Tin Tvrtković's user avatar
25 votes
4 answers
53k views

Enabling nginx Chunked Transfer Encoding

It looks like nginx 0.8.35 may support chunked transfer encoding: Changes with nginx 0.8.35 01 Apr 2010 *) Change: now the charset filter runs before the SSI ...
rentzsch's user avatar
  • 395
25 votes
2 answers
22k views

How to uninstall git installed from the source? [closed]

I installed the git using this article. Now I want to uninstall the git. How to do it?
Mikhail's user avatar
  • 559
24 votes
3 answers
36k views

Putting RSA keys into azure key vault

How can I store my key pair (typically the id_rsa and id_rsa.pub) in azure key vault. I want to put the public key in my GIT service and allow a virtual machine to download the private key from Azure ...
MercilessMaverick's user avatar
23 votes
12 answers
36k views

Setting Up Git Repository on Remote Windows Server?

I have a windows server which I can access locally or remotely over the internet through remote desktop connection, etc. I want to set up a git repository (something similar to "trunk" in subversion),...
Goober's user avatar
  • 361
22 votes
1 answer
19k views

Gitlab backup file location (Omnibus installation)

I have installed Gitlab using omnibus installation package. I took a backup using below command sudo gitlab-rake gitlab:backup:create Backup was successfully created. But I am not sure where to ...
shashwat's user avatar
  • 333
22 votes
2 answers
15k views

Use git commands with another path rather than the actual working dir

When using git add . uses the actual path where you're (incase is a git repo). How would I do for using git add, git commit and git push' outside of the working dir? Likegit add /Users/zad0xsis/my-git-...
pmerino's user avatar
  • 481
21 votes
6 answers
5k views

Putting a whole linux server under source control (git)

I am thinking about putting my whole linux server under version control using git. The reason behind it being that that might be the easiest way to detect malicious modifications/rootkits. All I would ...
Tobias Hertkorn's user avatar
20 votes
3 answers
61k views

Git clone/pull across local network [closed]

I'm trying to clone/pull a repository in another PC using Ubuntu Quantal. I have done this on Windows before but I don't know what is the problem on ubuntu. I tried these: git clone file:////pc-name/...
Tomas Ramirez Sarduy's user avatar
20 votes
5 answers
72k views

What does "master" mean in "git push origin master"

I'm new to git as a version control system. I tried reading the documentation, but I don't understand what "master" means in this command: git push origin master Can someone explain in very dumbed-...
learningtech's user avatar
  • 7,445
19 votes
6 answers
15k views

Git - post-receive hook with git pull "Failed to find a valid git directory"

It's very weird but when setting a git repository and creating a post-receive hook with: echo "--initializing hook--" cd ~/websites/testing echo "--prepare update--" git pull echo "--update completed-...
zanona's user avatar
  • 345
19 votes
5 answers
76k views

Using GIT variables in a declarative Jenkins pipeline

I'm struggling to access GIT variables in my Jenkins pipeline I need to know what GIT branch it's been checked out inside some bash code in a stage of the pipeline. I will use this to create ...
ColOfAbRiX's user avatar
  • 1,080
19 votes
3 answers
42k views

How to setup Gitlab with post-receive hook?

I am using Gitlab on one server and would like to push my git repository on commit of the master branch to another webserver. So when I push a new version of the website the production server gets ...
tvb's user avatar
  • 341
18 votes
3 answers
8k views

How do I uninstall gitosis?

I've installed gitosis on my dramhost machine but now I want to uninstall it because it's causing more problems than solutions. The thing is that I can't find how to uninstall it. I deleted the ~/...
Oscar Del Ben's user avatar
18 votes
2 answers
10k views

Which is better for website backup - rsync or git push

I run 2 LAMP web servers at different providers for disaster recovery purposes - a high powered live server, and a low powered backup server. Currently I rsync all the data from the live server to ...
David Laing's user avatar
17 votes
5 answers
4k views

Git commit auditing

I have a git server running over ssh and each user has a unix account on the system. Given that two users have access to a repo, how can I be sure which user performed which commit, since the commit ...
yannisf's user avatar
  • 587
17 votes
3 answers
15k views

Use git for multiple server configuration files

We have migrated a lot of source code over to git and are very happy with our current solution. We would like to have our server configuration files versioned on the same system, but there are a few ...
Kariem's user avatar
  • 561
16 votes
4 answers
26k views

Create SSH user with limited privileges to only use Git repository

I have a git repository hosted on my SunOS server, that I remotely use through ssh git clone ssh://[email protected]/path/to/git Now I need to add more users to be able to access that repository, ...
Bach's user avatar
  • 343
16 votes
7 answers
29k views

Yum doesn't install latest version of Git on Centos6

When I go to Gits download section it mentions that latest version is 1.8 and I can install it by yum install git on Fedora. I'm running CentOS6 so that command should also work for me, but yum tells ...
Reza Sanaie's user avatar
15 votes
6 answers
7k views

Correct user names when tracking /etc/ in git repository and committing as root

We use git to track changes in /etc/ on our servers. Administrators work as root when changing files in /etc/, and thus their commits have author root <root@machinename> This is not very ...
cweiske's user avatar
  • 817
15 votes
3 answers
15k views

Setting up a git repo on my GoDaddy hosting plan

I have a project which is version-controlled using git. What I want to be able to do is set up a repo on my (ssh-enabled) GoDaddy shared hosting package so that I can deploy with a push rather than ...
Tom Wright's user avatar
15 votes
1 answer
9k views

Automatically sign all commits with git [closed]

With git 1.7.9, it's possible to sign a commit with the -S option. Is it possible to set it default through git config --global? So instead of git commit -S -m 'Commit message', it would be just git ...
tamasd's user avatar
  • 253
15 votes
2 answers
17k views

Using LDAP as auth method for git repositories

I want to convince my boss that we should be using git for version control. He says, that it absolutely must authenticate users through our central LDAP server. I looked at the various solutions (...
Leonard Ehrenfried's user avatar
14 votes
2 answers
7k views

GIT repository over LAN

I am trying to setup a GIT repository over LAN in Ubuntu OS. I am able to setup a GIT repository, but not sure HOW TO expose the repository to other users in LAN. As it requires a server, I installed ...
user avatar
14 votes
2 answers
39k views

What "access rights" could be blocking access to a gitlab repository?

I'm trying to setup gitlab (6.5.1) on a fresh clean server. Everything appears to work, but git is unable to push to any project. Following the commands from the newly created project page and pushing ...
Caleb's user avatar
  • 11.9k
13 votes
2 answers
22k views

How do I make GitLab delete old backups?

I use the rake task to create backups for GitLab 6.8.2. gitlab-rake gitlab:backup:create In /etc/gitlab/gitlab.rb I added the following line: gitlab_rails['backup_keep_time'] = 60 This is supposed ...
Jan Deinhard's user avatar
  • 2,403
13 votes
2 answers
13k views

debian: FATAL -> Failed to fork

First time in my life I have something like this: root@peklan:~# aptitude install git-core No packages will be installed, upgraded, or removed. 0 packages upgraded, 0 newly installed, 0 to remove and ...
holms's user avatar
  • 1,584
13 votes
8 answers
88k views

Gitlab not working with SSH Keys

I am having issues with Gitlab. I used the following guide to install and configure Gitlab https://github.com/gitlabhq/gitlab-recipes/blob/master/install/centos/README.md. The installation seemed to ...
greyfox's user avatar
  • 267
13 votes
6 answers
4k views

Can etckeeper be used to track config files outside of /etc?

Specifically I would like to track my grub.conf (/boot/grub/grub.conf) and some oracle files (i.e. /db/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora). I attempted using links; however ...
ErebusBat's user avatar
  • 935
13 votes
4 answers
5k views

Encrypt git repository on server (safe against theft of physical hardware)

I have a production server (Ubuntu, running 24/7) with a git repository and some client computers each with a working copy of this repository. In the client computers, simply using home folder ...
leemes's user avatar
  • 301
13 votes
2 answers
1k views

git, nagios and hooks, corrupted git repo

Background We're using nagios to monitor our infrastructure. We don't have the nagios configs under version control at the moment, and there are two of us that manage nagios configuration. As such, I'...
EEAA's user avatar
  • 110k
12 votes
5 answers
15k views

Can't install GIT on a CentOS 6.0 x64

I'm trying to install GIT by either RPM or YUM but i can't. I get the following error: error: Failed dependencies: libcrypto.so.10 is needed by git-1.7.1-2.el6.i686 libcurl.so.4 is ...
CodeOverload's user avatar

1
2 3 4 5
23