git

git: hash autocomplete

Is there any chance to configure git to autocomplete the hashes when pressing TAB? Edit: Please note that this question is not about autocomplete, but about hash autocomplete. See my comment to VonC's answer. ...

git: Automatic tagging of releases

How do you tag your release versions in git? Now I have each release identified by build number, but they increment even if there are no changes in the repo. My idea is to have it generated automatically on successful deployment on staging server. E.g. run Hudson build when successful, add new tag, i.e. 1.0-1 on next successful build ...

How to add other users(windows) to gitosis

I just setup an git repository using gitosis. What I can't figure out is how to add other users. All tutorials I find only says "gather their public SSH keys". First of I tried to create the locally on my machine (not server) but I kinda figured that's the wrong way to go. Now I've tried to create public key using PuTTy keygen on a wind...

Is it possible to switch the user on a git repo?

We have a staging server that we use git to manage very simply: develop locally, git commit/push, and then git pull on the server. I'd love to be able to switch user on the server's copy so I could run the git pull rather than the person who set up the environment. Any idea if this is possible? ...

GIT: after push, remote repo shows files as deleted

Cannot find any of the files on my remote repo. Created a GIT repo on shared hosting (site5) as described by their tutorial init'd it and added a simple text file. OK Cloned on to my local (WinXP) machine. OK Deleted the test file on my local copy, added a few real files. OK Committed the local changes. OK Pushed to remote server. OK M...

Applying Changes from a patch file to the INDEX file and your workspace

I was reading this (old) posting on GIT and read the following: By using git add --p, you can choose which patches from a file you want to include for checkin. The result is that the index contains a version of the file which is not in your working copy. My question is twofold: Is this still true? How do I bring the chan...

git: who pushed in post-receive hook

How do I determine who pushed to the repository? I.e. Somebody does git push origin master and in the post-receive hook on the origin repo I need to use the name or e-mail of Somebody. ...

git: empty arguments in post-receive hook

I'm writing post-receive hook basing on the post-receive-email script from the contrib dir, but it seems that the oldrev and newrev arguments are empty. The script looks like this: #!/bin/bash oldrev=$(git rev-parse $1) newrev=$(git rev-parse $2) The script runs on push, but all $1, $2, $oldrev and $newrev are empty. Should I config...

Can git merge upstream changes both to a file and a copy within a repository?

Is there a way to copy a file (or subdirectory) within a git repo and have git merge upstream changes to both copies? Randal Schwartz mentions that git can do this (27 minutes into this Google Tech talk: http://www.youtube.com/watch?v=8dhZ9BXQgc4 ) Background: I'm using git to track and update CMS software---i.e., I have the CMS in a ...

git command to emit name of remote tracking branch

I'd like a command that emits the name of the tracked branch for the branch I'm on. Something like: $ git checkout --track -b topic origin/master Branch topic set up to track remote branch master from origin. Switched to a new branch 'topic' $ git unknown-command origin/master Is there such a command? ...

Unsync'd Git Repository in Dropbox

I have a git repository (and working directory) that is stored in my Dropbox so I can move back and forth between computers without having to commit or stash (read: without any effort at all). This is working great except for one minor annoyance that is becoming a major annoyance. Every so often, I'll leave one computer in a fully commi...

Git commit fails

When I try to do a git commit -a, I get a nice vim instance. I type in my message, do :wq, vim closes down and the terminal has the message, Aborting commit due to empty commit message. Pursuant to this question I made sure my core.editor says "gvim" (so does the user.editor, fwiw), but I still get that error message. Does anyone ha...

Listing and deleting Git commits that are under no branch (dangling?)

I've got a git repository with plenty of commits that are under no particular branch, I can git show them but when I try to list branches that contain them, it reports back nothing: I thought this is the dangling commits/tree issue (as a result of -D branch), so I pruned the repo, but I still see the case after that: $ git fetch origin...

How to get 'git checkout XX' to work from a gitosis based repository?

I have migrated a CVS repository through svn to git, and the resulting repository as generated by svn2git (the one recommended here) has all my old CVS branches available so I can just "git checkout SV46" to get my SV46 branch and then switch to SV48 afterwards. Very nice. I have a gitosis repository set up on a machine named "sandbox"...

Use git "log" command in another folder

I have some php files in a Folder A (which is a git project). In these php file I want to execute "git log" but for the folder B. Folder B is another git project (so log is different between A and B). How I can do that with shell command ? ...

Getting maven and git to work.

I have recently began delving into git and maven. I have a system that has several module sets and this is stored in various git repositories, I need this to be pulled down into the same workspace and run various maven goals. I was wondering if anyone else has run through this setup and provide tired and true way of doing this. I would...

GIT branching/forking question

So, total newbiee to GIT. Been reading through the guides and think I have the basics but am having difficulties accomplishing this one goal. I have a repo created for my generic markup source code. Just stuff I reuse for every breakout. It's called markupDNA.git I would like to have different directories in my mac sites dir "~/Sites/...

Stage file by it's file name, regardless of directory--Git

I have very nested directories in a project, and I'm a lazy programmer. Let's say I have a file name EventEditor.foo I want to stage my file regardless of whether it's in the root directory or ./src/holy/sweet/mother/of/baby/raptor/jesus/this/is/a/long/hiearchy/EventEditor.foo My goal would be to be all, "Yo Git, add EventEditor" and ...

Enforce no merging while unstaged changes exist in git

I want to enforce (i.e. throw an error and fail) that whenever I do a git merge I don't have any unstaged changes, much in the same why a git rebase will not work if unstaged changes exist. Is there a way to do this? ...

good ways of adding/removing multiple directories to/from git repo?

Let's say I have this dir structure: /project1 /SomeFolder /obj /bin /project2 /obj /bin Let's say each directory has source files I want to check in, but I don't want to check in /obj and /bin directories or their contents... The way I did was git add . and than browse to each dir and do git rm obj git rm bin As y...