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

1
vote
1answer
166 views

Crontab with Github

I want to be able to push a repository to Github at midnight, every night. I know that Github isn't a back-up service, and, in no way am I expecting it to be this - I just want the best up-to-date ...
3
votes
2answers
251 views

create pseudo shell for a command

I feel like this should be straighforward to some degree... Basically, for some command, I want to be able to invoke another command that will scope all params to that command. so... git commit -am ...
3
votes
3answers
237 views

Mail cron output only when Git throws a real error

There exists a Git repo that is on one server, we want to generate doxygen output for it on a different server. The following command works for me but has the downside of sending a mail everytime the ...
6
votes
1answer
119 views

How to show all files git knows about?

How can I produce a list of filenames (incl. paths) that git knows about over the course of the whole history?
-1
votes
1answer
51 views

I have installed linux on my system and I wanted to install git. Can anyone help me? [closed]

How to install git in linux and how to work with git?
1
vote
0answers
92 views

How to install master branch of freeradius on Centos

Could someone take me through the steps to install the master branch of freeradius on a fresh Centos 6 installation?
0
votes
1answer
979 views

make install - how to use wget, not curl

I do not have root access on my Ubuntu but want to install git. I was following this tutorial but when running make or make install it says curl is not installed. Can I use wget instead if this is a ...
4
votes
2answers
1k views

Does git pull after init remove untracked files?

I just made a simple script and created a new repository for it on GitHub. After initializing the local repo, moving the script to the repository and pulling the GitHub repository (containing only a ...
3
votes
1answer
265 views

How can I download all the software ( funtoo git repository) for offline use of funtoo, similiar to apt-mirror

I am working on a ship so once at sea I have no internet. The idea is to clone the complete git repository so that I can still install software when offine. I am using apt-mirror with debian which ...
14
votes
4answers
7k views

How can I solve this ssh-agent problem?

I'm using Linux Mint, and have not been able to get gnome-keyring to unlock automatically at login, it seems. A symptom of my problem is as follows: $ ssh-add Identity added: /home/me/.ssh/id_rsa ...
7
votes
2answers
2k views

What does “--” mean in Linux/Unix command line? [duplicate]

Possible Duplicate: What does “--” (double-dash) mean? git diff [options] [<commit>] [--] [<path>…] In here, how should I understand what [--] means? And when should I use it.
5
votes
1answer
242 views

Custom bash autocomplete for git breaks other git autocomplete features

I am trying to add autocompletion to git commit upon hitting TabTab. The autocomplete feature I am working on is based on a branch-naming convention. The convention is to append the PivotalTracker ...
4
votes
3answers
16k views

How to grant read/write to specific user in any existent or future subdirectory of a given directory?

I'm a complete newbie in system administration and I'm doing this as a hobby. I host my own git repository on a VPS. Let's say my user is john. I'm using the ssh protocol to access my git ...
3
votes
1answer
252 views

Bash script with quotes and spaces

I'm trying to get some nice output out of git: FORMAT='%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' LOG_PARAMS="--color --pretty=format:$FORMAT --abbrev-commit ...
3
votes
2answers
2k views

git commit error - cannot run vim: No such file or directory

$ git commit error: cannot run vim: No such file or directory error: There was a problem with the editor 'vim'. Please supply the message using either -m or -F option. How can I overcome the error ...
-1
votes
1answer
132 views

my git is messed up for all commands, how can I fix it?

I did this (was trying to set an 'self' alias with -v): git() { if [[ $1 == "commit" ]]; then command git commit -v; else command git "$@"; fi; } git() { if [[ $1 == "commit" ]]; then command git ...
19
votes
4answers
4k views

How can I create an alias for a git [action] command (which includes spaces)?

Most of my my aliases are of this form: alias p='pwd' I want to alias git commit so that it does git commit -v But trying to create an alias with a space gives an error: $ alias 'git commit'='git ...
25
votes
3answers
31k views

GUI for GIT similar to SourceTree

Is there a similar piece of software to SourceTree, a GUI for git, for Linux? I know about Giggle, git cola, etc. I'm looking for a beautiful, easy to use GUI for git.
4
votes
1answer
78 views

How do I find a tag that contains a commit?

I have the SHA ID of a commit that I am interested in and would like to know how to find the first tag that contains it.
4
votes
1answer
208 views

How does this git alias work?

Usually, git aliases are confined to a single command: git config --global alias.ci commit So, instead of git commit you could do git ci But it seems you can insert a function in there as well: ...
3
votes
1answer
819 views

watch command not showing colors for 'git status'

I'm trying to get watch to display colors from 'git status'. I've tried running watch with the --color option, as suggested elsewhere here, but, still, watch --color 'git status' doesn't display ...
22
votes
6answers
3k views

Are there pitfalls to putting $HOME in git instead of symlinking dotfiles?

I have for many years had my entire $HOME directory checked into subversion. This has included all my dotfiles and application profiles, many scripts, tools and hacks, my preferred basic home ...
3
votes
2answers
197 views

place the aliased version of an existing command in /usr/bin/

I use Vim a lot, and I know how I can start vim in insert mode. So I have an alias named vii in my .bash_aliases file. On other hand I use Git a lot too, and I have this line in my .gitconfig: ...
5
votes
1answer
883 views

Git auto-complete

I am using Git as many of you do. Also, I don't use any GUI for that — just CLI. So I was wondering: are there any way to make Git commands (git status, git checkout etc.) complete themselves when ...
13
votes
3answers
2k views

Given a git patch id, 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 ...
4
votes
1answer
112 views

Invoke git without loading user gitconfig

A git-interfaced tool written in Python breaks because of some settings in my local ~/.gitconfig, namely diff.noprefix=True. I know that I can use something like git -c diff.noprefix=False diff in ...
7
votes
2answers
426 views

Git do not overwrite symlinked directory on branch checkout

How can I make directory read-only with git? The situation is - in project, I have a symlink to shared framework. I don't want it to be overwritten/changed in any way (not even mtime or atime). How ...
38
votes
3answers
16k views

How to colorize output of git?

Is there a way to color output for git (or any command)? Consider: baller@Laptop:~/rails/spunky-monkey$ git status # On branch new-message-types # Changes not staged for commit: # (use "git add ...
0
votes
1answer
316 views

Giving input to background processes

Is there any way to give input to background processes or which run as daemon processes? I was coding some Puppet configuration files and I had to push them to some remote machine. For that purpose I ...
10
votes
2answers
977 views

Can git configuration be set across multiple repositories?

Git seems to support configuration values at three levels: Per-system global settings (stored in /etc/git-core) Per-user global settings (stored in ~/.gitconfig) Per-repository local settings ...
1
vote
1answer
494 views

Crontab with SVN and Git

I have some repos which are both in SVN and Git. My username is guyfawkes, and in my home directory I have folder www which contains all my repos. In this directory I also have file update.sh: ...
4
votes
1answer
408 views

How can I git diff markdown (.md) files

I have some markdown files but I can't git diff them. No result at the command line and not supported in gitg (visual git) Is that possible with the files as they are, without converting them to ...
2
votes
2answers
1k views

Sync local files to remote git repository

I have my git repository on a linux located on the company server. I ssh into my linux machine and edit files there. Problem This method is great until I have a good connection to the server. in ...
4
votes
1answer
293 views

What's the fastest (CPU time) way to get my current git branch?

I'm trying to improve the performance of my fish prompt, and since my prompt includes my current git branch, I'm wondering if there may be a way to make it faster. Right now I'm using git ...
0
votes
0answers
679 views

gitweb.cgi: “Premature end of script headers: gitweb.cgi”

I'm running LAMP on Arch and now want the gitweb going on apache. Followed the instructions as in https://wiki.archlinux.org/index.php/Gitweb but on the gitweb directory (here ...
3
votes
1answer
227 views

How can I make git status --short be the default

I can use git status to see a verbose listing (also git status --verbose) and git status --short to see a short listing. How I can I change git status --short be the default instead of the current ...
3
votes
2answers
1k 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).
3
votes
2answers
583 views

how to perform git push using crontab

I'm using crontab for synchronizing git repositories. I was able to do operations like git add and commit, but can't perform git push to origin, since every git push asks for a password. How can I ...
2
votes
1answer
1k views

How do I restart apache as non-root (using a git-hook)?

For one specific user I want to be able to restart Apache. This user does have sudo privileges and I could run sudo /etc/init.d/apache2 reload, but I want to include this restart script in a git ...
3
votes
3answers
3k views

How can I pass output of one command as an argument to another

A similar question has been asked, but since I am new to Unix the answer was not clear to me due to the context. What I want to do is to pass the output of one command as an argument to another. I am ...
6
votes
3answers
2k views

Passing SSH options to git-clone

I connect to my server using SSH: ssh user@server -p 2224 -zZ abcd I also have a git repository on my server. The only way I know to clone is: git clone ssh://user@server.com:2224/path/to/repo ...
6
votes
2answers
53k views

Installing git “sudo: apt-get: command not found”

I am trying to install git. I run the following command: sudo apt-get install git-core git-gui git-doc But receive the following error: sudo: apt-get: command not found What should I do?
9
votes
2answers
16k views

How can I update to a newer version of Git using apt-get?

I've just set up a new machine with Ubuntu Oneiric 11.10 and then run apt-get update apt-get upgrade apt-get install git Now if I run git --version it tells me I have git version 1.7.5.4 but on my ...
4
votes
2answers
1k views

Git-SVN Not Allowing Me to Authenticate

Git 1.7.9.1 on Arch Linux: git svn init -s https://app.svn.beanstalk.com/repo Initialized empty Git repository in /path/to/repo/.git/ Authentication realm: ...
6
votes
1answer
5k views

What is the .gitignore pattern equivalent of the regex (Big|Small)(State|City)-[0-9]*\.csv

I have a regex I stuck in my .gitignore similar to: (Big|Small)(State|City)-[0-9]*\.csv It didn't work so I tested it against RegexLab.NET. I then found the gitignore man page which led me to ...
3
votes
1answer
282 views

How to stage part of hunk with added newline at EOF?

Is there some way to stage individual lines of a file which has just been changed to include newline at EOF? I tried add -p, but it wouldn't split the relevant hunk into small enough parts, and it's ...
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 ...