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

learn more… | top users | synonyms

6
votes
7answers
2k views

How to sort (by whatever key) BibTex entries in `.bib` file?

I work with LaTeX and do versioning with Git. For bibliography management I use Mendeley. The problem is that each time Mendeley synchronizes it's .bib exports, they are in different order, what ...
3
votes
1answer
1k views

git grep colors differ from grep custom colors

I've setup grep colors in my ~/.bashrc : export GREP_COLORS='ms=01;34:mc=01;34:sl=:cx=:fn=35:ln=32:bn=32:se=36' They work for grep --color=auto grep --color=always Unfortunately, those custom ...
2
votes
1answer
104 views

Revert commits and commit them to a branch?

I'm cloning a popular open source project into GitHub, and I only realized this after it was too late. I'm also trying to convert this project over to use Maven instead of Ant/Ivy for a build tool. I ...
2
votes
0answers
2k views

Git hangs indefinitely when trying to push --all to GitHub

When I try and push --all to GitHub, the Git transfer starts out fast, slows down, and eventually stops. It doesn't fail, it just slows to a halt. What's going on? This is really frustrating, I'd ...
21
votes
9answers
3k views

How to keep track of changes in /etc/

I would like to keep track of changes in /etc/ Basically I'd like to know if a file was changed, by yum update or by a user and roll it back if I don't like the chage. I thought of using a VCS like ...
2
votes
1answer
62 views

GIT push only commits older than x months

Is there a way to specify push commits that are older than x months to remote y ? Like setting up a branch that automatically tracks master-(x months) and then push it to a separate remote?
3
votes
5answers
2k views

Configure permissions

I'm sharing a git repository with a friend over SSH. He pushes from and pulls to his git repository using my machine's SSH server, where the shared git repository is. Problem is that when he pushes a ...
3
votes
1answer
92 views

Hosting Git Repositories as per GitHub [closed]

I'm wondering how exactly GitHub does what they do as far as hosting Git repositories goes. For example, I'm assuming that they manage repository push permissions based on values in some SQL table ...
1
vote
1answer
256 views

route traffic to github through specific network interface [closed]

okey, I'm a complete NAP, so take it easy on me :) My Situation; My computer is in this stupid cooperate network of the company i work for. They have alot of policies and stuff, so its not possible ...
0
votes
4answers
456 views

What is the proper way to automate SSH/local command?

I have gitolite on a Centos 5.5 box - when a repository is updated, I need to send a command to my bug tracking appliance to get the new commands. Right now, I have the following command working: ssh ...
6
votes
1answer
1k views

Multiple installed versions of git - centos

I manually installed git 1.6 a year or two ago. I noticed today that the 1.7 version is available in yum, and installed it (package git-all) I now get the following output: [root@ovz5197 ~]# git ...
5
votes
4answers
145 views

Change command-line “environment” to programs command

In a console, is it possible to change into a commands "environment"? To explain, I take "git" as an example. While programming and using a git repository, I change to the repos path and then do many ...
12
votes
3answers
7k views

Answer yes in a bash script

I'm trying to do a git clone trough a bash script, but the first time that I run the script and the server is not known yet the script fails. I have something like this: yes | git clone ...
4
votes
2answers
3k views

Tar a folder without .git files?

If I tar a folder that is a git repository, can I do so without including the .git related files? If not, how would I go about doing that via a command?
1
vote
1answer
3k views

Permissions issue with git

I have a development machine that use runs on CentOs. Whenever i pull from git using git pull i get "permission denied" issue/error. Git apparently doesn't have the permission to overwrite the ...
6
votes
1answer
3k views

Github adding a repository as a fork from an existing clone

So I have a git repository that I cloned from an upstream source on ghithub. I made a few changes to to it (that are uncommitted and in the master branch). What I want to do is push my changes onto my ...
3
votes
1answer
458 views

Git - remove deleted files

I'm using this simple git alias rmdel = "!git rm $(git ls-files -d)" meant "remove deleted", i.e. to remove from the staging area all files deleted from the file system. It works fine except ...
0
votes
1answer
678 views

github ssh problem- permission denied(publickey)

I tried setting up git as shown in Github's help page, on Arch linux but there seems to be some problem with the SSH keys. It gives this error- Permission denied (publickey). This problem is ...
0
votes
2answers
426 views

Ruby and Git refuse to update. (Mac)

I've been trying to update Git for a while. I'm currently stuck on 1.7.3.4, and I've tried updating to 1.7.4.x, and 1.7.5.x but it never works. Today I compiled and installed Ruby 1.9.2, but it still ...
1
vote
1answer
715 views

Execute a command in a different path

When using Git VCS, I execute all of the git commands on the directory that contains a .git repository. I want to execute a git-pull through an SSH trigger but how do I define the path to the ...
3
votes
2answers
578 views

timeline statistics with git

I would like to generate a statistic from my git repository to create a time-chart: <commit> <timestamp> <changed-lines> 35abf648cfc 2011-04-04t17:23:58 +20 -4 93acb668f32 ...
-1
votes
1answer
143 views

standard VCS ignore list [closed]

What all do you think is the best standard list of ignored files for VCS? For example here's my .gitignore_global file. # Compiled Sources # ################### *.pyc *.pyo *.exe *.so *.o *.a *.la ...
11
votes
7answers
2k views

How do I encrypt git on my server?

Heres the closest I've gotten: I installed gitolite in the /Private folder using ecryptfs-utils (sudo apt-get install ecryptfs-utils adduser git ecryptfs-setup-private then the rest was configuring ...
3
votes
1answer
6k views

Unable to git clone over ssh

I created a bare git repository and pushed to as root. Then I ran su myuser and ran the following commands: $ whoami myuser $ mkdir t $ cd t $ git clone ssh://myuser@mybox.net:1234/git3 Cloning into ...
0
votes
0answers
146 views

git and remote security with Encfs [duplicate]

Possible Duplicate: How do i encrypt git on my server? I wanted to create a user on my server to use as a private repository. I'd like the files to be encrypted. Encfs will timeout after ...
13
votes
1answer
10k views

Ignore whitespaces changes in all git commands

I've found tons of sites that explain how to have git warn you when you're changing line endings, or miscellaneous other techniques to prevent you from messing up an entire file. Assume it's too late ...
1
vote
0answers
109 views

I am failing to 'git clone clutter' [closed]

While trying to build clutter from JHBuild, I get stuck at the stage where I have to clone it: $ jhbuild buildone clutter *** Checking out clutter *** [1/1] git clone ...
3
votes
3answers
6k views

I am failing to clone a git repo when behind a proxy

When I run git clone git://git.gnome.org/tracker, I get: Cloning into tracker... git.gnome.org[0: 209.132.180.173]: errno=Connection refused fatal: unable to connect a socket (Connection refused) ...
0
votes
2answers
770 views

Git Server Bash and SSH

I want to use Git over SSH with my Linode VPS running Ubuntu 10.04 LTS. Instructions seem pretty easy, infact given I had already setup my SSH key etc.. All I had to do was instruct my local ...
3
votes
3answers
686 views

For what purpose would perl* be excluded in yum.conf?

I am not an Unix/Linux admin. I was attempting to install git on our server, and after much googling and trial and error, I discovered that perl* is excluded in our yum.conf file, preventing perl-Git ...
5
votes
3answers
846 views

extracting “tag” information from git with a shell script

The vc bundle is a neat little package that extracts information about a git repo for easy insertion into a LaTeX document. It doesn't currently extract information about whether the current commit is ...
58
votes
9answers
4k views

Tips for putting ~ under source control

I want to put my home directory (~) under source control (git, in this case), as I have many setting files (.gitconfig, .gitignore, .emacs, etc.) in there I would like to carry across machines, and ...
15
votes
1answer
14k views

How to remove a file from the git index

How do I remove a file from a git repositorie's index without removing the file from the working tree? If I had a file ./notes.txt that was being tracked by git, I could run git rm notes.txt. But ...
3
votes
2answers
214 views

Specifying which git repo to use

I have a bash script, called cgit, that acts as git for one specific git repo (located at /.git): #!/bin/bash cd /; sudo git $@ > /dev/stdout I use it to keep track of imporant system files: ...