git

Does git have anything like `svn propset svn:keywords` or pre-/post-commit hooks?

Browsing through the git documentation, I can't see anything analogous to SVN's commit hooks or the "propset" features that can, say, update a version number or copyright notice within a file whenever it is committed to the repository. Are git users expected to write external scripts for this sort of functionality (which doesn't seem ou...

Bug tracker setup with Git integration?

I know I can do most of this by hacking Trac and using Git hooks, but I was wondering if someone has / knows of something ready. Commenting on (and closing) tickets from commit messages would be nice, specially if the diff appears inline with the comment/closing remark. sha1 hashes should be auto-linked to gitweb/cigt/custom git browse...

Is there a better way of writing a git pre-commit hook to check any php file in a commit for parse errors ?

What I have so far is #!/bin/sh php_syntax_check() { retval=0 for i in $(git-diff-index --name-only --cached HEAD -- | grep -e '\.php$'); do if [ -f $i ]; then output=$(php -l $i) retval=$? if [ $retval -gt 0 ]; then echo "===========================================================================...

Why is branching and merging easier in Mercurial than in Subversion?

Handling multiple merges onto branches in Subversion or CVS is just one of those things that has to be experienced. It is inordinately easier to keep track of branches and merges in Mercurial (and probably any other distributed system) but I don't know why. Does anyone else know? My question stems from the fact that with Mercurial you c...

How to have two remote orgins for Git?

My company is a small one where we would be using Git for version control. The main server will be local. But we do want an server where our local repo is kept online to give access to our clients so that they can have assurance that we are doing the right thing and to allow them to check out from there if needed. So if I simply wish t...

How do DVCSs (DRCSs) work?

I have been hearing a lot of good things about DVCS systems, in particular about bazaar. Apart from the concept of distributed repository, I see two main advantages being touted: the merge is better automated, and the rename is handled right. Could someone please point me at some text explaining how exactly the improvements work? How do...

Git ignore file for Xcode projects

Which files should I include in .gitignore when using Git in conjunction with Xcode? ...

Source Control for Everyone?

I've got a number of non-technical users that all share a set of project files. It would be ideal to have them using version control, but I think that both subversion and git are too technical for non-technical office staff. Is there any distributed source control software that would work well for normal people? ...

How to setup GIT bare HTTP-available repository on IIS-machine

Hello/ My build-server already runs IIS to serve 80 and 443 port over TCP. I want to make centralized "push/pull" GIT repository available to all my team members over the Internet. So I should use HTTP or HTTPS. But I cannot use Apache because of IIS already hooking up listening sockets on 80 and 443 ports! Is there any way to publis...

How do you discard unstaged changes in git?

If some changes are added to the index and there are some changes that are not added to the index, how do I discard the changes in my working copy that are not added to the index yet? ...

How to make git ignore changes in case?

I'm not too sure what is going on here, but sometimes a particular file in my repository will change the case of it's name. e.g.,: before: File.h after: file.h I don't really care why this is happening, but this causes git to think it is a new file, and then I have to go and change the file name back. Can you just make git ignore case...

How could I get my SVN-only host to pull from a git repository?

I'd really like to get our host to pull from our Git repository instead of uploading files manually, but it doesn't have Git installed. So is there a way to trick Subversion (which they do have) into checking out a Git repository? I think I already know the answer, namely bug my host to add Git and live with it until they do, but I tho...

How to get the changes on a branch in git

What is the best way to get a log of commits on a branch since the time it was branched from the current branch? My solution so far is: git log $(git merge-base HEAD branch)..branch The documentation for git-diff indicates that "git diff A...B" is equivalent to "git diff $(git-merge-base A B) B". On the other hand, the documentation f...

How often should you use git-gc?

How often should you use git-gc? The manual page simply says: Users are encouraged to run this task on a regular basis within each repository to maintain good disk space utilization and good operating performance. Are there some commands to get some object counts to find out whether it's time to gc? ...

Can you view an aggregate changeset in git? If so, how?

In Subversion you can specify a range of versions to get an aggregate view of a series of commits. Is this possible in git? If so, how? ...

Git commit text file?

I am trying to learn how to use git, and in all the tutorials they say that you can do git init git add . git commit but when I do that I get a big text file opened up, and none of the tutorials seem to address this, so I dont know what to do. Any help? ...

How can I generate a git diff of what's changed since the last time I pulled?

I'd like to script, preferably in rake, the following actions into a single command: Get the version of my local git repository. Git pull the latest code. Git diff from the version I extracted in step #1 to what is now in my local repository. In other words, I want to get the latest code form the central repository and immediately ge...

How do you remove untracked files from your git working copy?

How do you remove untracked files from your git working copy? ...

Dealing with SVN keyword expansion with git-svn

I recently asked about keyword expansion in Git and I'm willing to accept the design not to really support this idea in Git. For better or worse, the project I'm working on at the moment requires SVN keyword expansion like this svn propset svn:keywords "Id" expl3.dtx to keep this string up-to-date: $Id: expl3.dtx 803 2008-09-11 14:...

How do I clone all remote branches with Git?

I have a master and a dev branch, both pushed to github, I've cloned, pulled, fetched, but I remain unable to get anything other than the master branch back. I'm sure I'm missing something obvious, but I have RTM any I'm getting no joy at all. ...