Git is a free & open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
5
votes
1answer
35 views
How to recover broken/partially deleted git repository
I accidently ran an rm -r on my .git directory. Luckly rm stopped when it got to a write-protected file, but I've still lost several things in my .git.
Files I still have:
FETCH_HEAD
ORIG_HEAD
...
1
vote
1answer
55 views
how to install .git file?
I know this has been covered everywhere, but I still don't get it.
I apt-get install git-core.
I'm trying to install websocketcpp here https://github.com/zaphoyd/websocketpp.
I wget ...
2
votes
1answer
57 views
git pull from remote but no such ref was fetched?
I have a git mirror on my disk and when I want to update my repo with git pull it gives me error message:
Your configuration specifies to merge with the ref '3.5/master' from the remote, but no such ...
1
vote
1answer
25 views
Git Alias 'Permission Denied'
I'm getting a 'permission denied' error on a git alias. It works with root but not my user account:
$ andy@ubuntu:/usr/local/bin$ sudo git config --global alias.lg "log --color --graph ...
1
vote
1answer
22 views
Git changelog grouped by day and user
Current code to generate change logs:
svn2cl --linelen 78 --reparagraph --include-rev --group-by-day
The closest I could get with vanilla options is
git shortlog --format='* [%h] %s' -w78,8,10
...
2
votes
1answer
32 views
git diff displays colors incorrectly
In order to get coloured output from all git commands, I set the following:
git config --global color.ui true
However, this produces an output like this for git diff, git log
whereas commands ...
0
votes
1answer
18 views
How to avoid 404 error with git instaweb?
I have tried running git instaweb start in two different repositories. In one it works fine, and indexes all the repositories in my home directory (even though run in a subdirectory). When run in ...
-1
votes
2answers
46 views
Trying to improve a sync to a shared drive
Easy question right? Just bare with me here..
I usually use Git to work with files on my local machine. I like this method because I can later check the files out on the shared drive for other ...
-2
votes
1answer
55 views
Unable to clone git repository: foo.git/info/refs not found
I tried to clone a git repository using the command:
git clone http://git.denx.de/cgibin/gitweb.cgi?p=uboot.git;a=summary
but I got the error:
fatal: ...
1
vote
0answers
47 views
git deploy using sudo nopasswd
I'm trying to write simple post-recieve script, which would switch to webserver user and pull git repository. To do so, I added git user to sudoers (I've added this to very last line):
git ALL = ...
3
votes
1answer
36 views
Excluding files in etckeeper with .gitignore doesen't work
I use etckeeper for changes in my configfiles (on debian squeeze)
Since I also have an ircdeamon running, there are some files, that change every minute in the folder
/etc/hybserv/
I don't want to ...
2
votes
1answer
59 views
How can I copy a git repo from a Makefile?
I'm writing a Makefile to sync my local dotfiles with GitHub. I recently decided to also add my .vim folder to the repo. But when trying to copy the .vim folder I keep getting a Permission denied ...
1
vote
1answer
68 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
105 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
64 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 ...
5
votes
1answer
90 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
45 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
38 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
112 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 ...
2
votes
1answer
103 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 ...
2
votes
1answer
103 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 ...
9
votes
4answers
1k 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 ...
5
votes
2answers
356 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
119 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 ...
1
vote
3answers
916 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
110 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 ...
0
votes
2answers
219 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 ...
0
votes
1answer
68 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 ...
12
votes
4answers
542 views
How can I create an alias for a command that includes a space?
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 ...
0
votes
0answers
325 views
Similar software 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
58 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
86 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:
...
1
vote
1answer
173 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 ...
11
votes
4answers
404 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
131 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:
...
2
votes
1answer
202 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 ...
6
votes
3answers
225 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
70 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
117 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 ...
13
votes
3answers
2k 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
153 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 ...
9
votes
2answers
281 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
239 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
131 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
415 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 ...
3
votes
1answer
152 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
292 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 ...
2
votes
1answer
114 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 ...
1
vote
2answers
374 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).
2
votes
2answers
211 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 ...